Bug 6120 – [CTFE] ICE on calling constructor of template struct with -inline in function/delegate literal.

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
Mac OS X
Creation time
2011-06-07T00:34:00Z
Last change time
2011-06-08T00:37:52Z
Keywords
ice-on-valid-code
Assigned to
nobody
Creator
kennytm

Comments

Comment #0 by kennytm — 2011-06-07T00:34:58Z
Test case: ------------------- struct Bug6120(T) { this(int x) { } } static assert({ auto s = Bug6120!int(0); return true; }()); ------------------- Error: CTFE internal error: illegal stack value ref Bug6120!(int) this = s; , (int x = 0; ) , this Assertion failed: (isStackValueValid(newval)), function createStackValue, file interpret.c, line 4121. Abort trap ------------------- The bug does not appear in 2.052, nor without -inline.
Comment #1 by kennytm — 2011-06-08T00:37:52Z