6282 – [CTFE] ICE when dereferencing a pointer to reference type from 'in' of an AA

D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 6282 - [CTFE] ICE when dereferencing a pointer to reference type from 'in' of an AA
Summary: [CTFE] ICE when dereferencing a pointer to reference type from 'in' of an AA
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: Other Mac OS X
: P2 normal
Assignee: No Owner
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
Reported: 2011年07月10日 12:26 UTC by kennytm
Modified: 2011年07月22日 13:57 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 kennytm 2011年07月10日 12:26:29 UTC
Test case:
-----------------------------
static assert({
 auto a = [4:"1"];
 auto n = *(4 in a);
 return n; 
}() == "1");
-----------------------------
x.d(3): Error: CTFE internal error: illegal reference value [4:"1"][4]
Assertion failed: (isRefValueValid(newval)), function createRefValue, file interpret.c, line 4978.
Abort trap
-----------------------------
The ICE also happens when the string "1" is replaced by any reference type (array/aa).


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