http://d.puremagic.com/issues/show_bug.cgi?id=6053
Summary: [CTFE] Two ICEs involving pointers (dereference and assign; pointer variable on stack) Product: D Version: D2 Platform: Other OS/Version: Mac OS X Status: NEW Keywords: ice-on-invalid-code Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: kenn...@gmail.com --- Comment #0 from kenn...@gmail.com 2011-05-24 11:37:43 PDT --- Test case 1: ---------------- static assert({ int* a; return true; }()); ---------------- Assertion failed: (isStackValueValid(newval)), function createStackValue, file interpret.c, line 4070. Abort trap ---------------- Test case 2: ---------------- static assert({ int a; *(&a) = 0; return true; }()); ---------------- CTFE internal error: unsupported assignment *& a = 0 Assertion failed: (e1->op == TOKarraylength || e1->op == TOKvar || e1->op == TOKdotvar || e1->op == TOKindex || e1->op == TOKslice), function interpretAssignCommon, file interpret.c, line 2380. Abort trap ---------------- (In 2.052 this simply result in a "cannot evaluate" error, not an ICE.) A related test case of #2 would be ---------------- static assert({ int a, b, c; (c ? a : b) = 1; return true; }()); ---------------- This causes an ICE because (c ? a : b) is rewritten to *(c ? &a : &b). -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------