Bug 12649 – "discards return value" warning will cause ICE on function pointer call

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-04-25T14:51:00Z
Last change time
2014-05-02T22:22:36Z
Keywords
ice, pull
Assigned to
nobody
Creator
k.hara.pg
Blocks
12647

Comments

Comment #0 by k.hara.pg — 2014-04-25T14:51:29Z
Test case: int foo() pure nothrow { return 1; } void main() { auto fp = &foo; //foo(); // Warning: Call to function test.foo without side effects // discards return value fp(); // ICE! }
Comment #1 by k.hara.pg — 2014-04-25T15:04:55Z
The regression has caused by the implementation of issue 3882. https://github.com/D-Programming-Language/dmd/pull/3491
Comment #2 by github-bugzilla — 2014-05-02T22:22:35Z
Commit pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/3a9a29b85edf2aa01fa89d0df04ccb460a925032 fix Issue 12649 - "discards return value" warning will cause ICE on function pointer call