July 26, 2011 [Issue 6386] New: [CTFE] ICE on pointer casting | ||||
---|---|---|---|---|
| ||||
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@puremagic.com ReportedBy: kennytm@gmail.com --- Comment #0 from kennytm@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: ------- |
July 31, 2011 [Issue 6386] [CTFE] ICE on pointer casting | ||||
---|---|---|---|---|
| ||||
Posted in reply to kennytm@gmail.com | http://d.puremagic.com/issues/show_bug.cgi?id=6386 Walter Bright <bugzilla@digitalmars.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |bugzilla@digitalmars.com Resolution| |FIXED --- Comment #1 from Walter Bright <bugzilla@digitalmars.com> 2011-07-31 12:09:15 PDT --- https://github.com/D-Programming-Language/dmd/commit/7ef3b2bb9e740df39108957ae5e3b2aa8253d351 https://github.com/D-Programming-Language/dmd/pull/284 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation