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

D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 6120 - [CTFE] ICE on calling constructor of template struct with -inline in function/delegate literal.
Summary: [CTFE] ICE on calling constructor of template struct with -inline in function...
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: Other Mac OS X
: P2 regression
Assignee: No Owner
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
Reported: 2011年06月07日 00:34 UTC by kennytm
Modified: 2011年06月08日 00:37 UTC (History)
0 users

See Also:


Attachments
Add an attachment (proposed patch, testcase, etc.)

Note You need to log in before you can comment on or make changes to this issue.
Description kennytm 2011年06月07日 00:34:58 UTC
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.


AltStyle によって変換されたページ (->オリジナル) /