4257 – ICE(interpret.c): passing parameter into CTFE as ref parameter

D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 4257 - ICE(interpret.c): passing parameter into CTFE as ref parameter
Summary: ICE(interpret.c): passing parameter into CTFE as ref parameter
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: Other Windows
: P2 normal
Assignee: No Owner
URL:
Keywords: ice-on-invalid-code, wrong-code
Depends on:
Blocks:
Reported: 2010年06月01日 07:21 UTC by Don
Modified: 2014年02月15日 02:43 UTC (History)
1 user (show)

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 Don 2010年06月01日 07:21:27 UTC
int bug4257(ref int x) { 
 return 3;
}
void bug4257b(int y) {
 static assert(bug4257(y));
}
--------
assert interpret.c(190) istate
And if it's not a reference parameter, it compiles but generates wrong code. This is the root cause of bug 3809, for example.
Comment 1 Walter Bright 2010年06月02日 15:34:10 UTC
http://www.dsource.org/projects/dmd/changeset/517 


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