[Issue 6386] New: [CTFE] ICE on pointer casting
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Jul 26 12:01:29 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6386
Summary: [CTFE] ICE on pointer casting
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Keywords: ice-on-invalid-code
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: kennytm at gmail.com
--- Comment #0 from kennytm at gmail.com 2011-07-26 12:01:27 PDT ---
Test case:
--------------------------------
static assert({
int x = 123;
int* p = &x;
float* q = cast(float*)p; // <-- unsafe pointer cast
return *q;
}());
--------------------------------
y.d(2): Error: CTFE internal error: illegal pointer value cast(float*)123u
Assertion failed: (isStackValueValid(newval)), function createStackValue, file
interpret.c, line 4998.
Abort trap: 6
--------------------------------
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list