Bug 9268 – [ice-on-invalid] void assignment in fail44.d no longer caught in frontend
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-01-03T20:11:00Z
Last change time
2013-01-08T07:32:37Z
Keywords
ice, ice-on-invalid-code, pull
Assigned to
nobody
Creator
code
Comments
Comment #0 by code — 2013-01-03T20:11:04Z
fail_compilation/fail44.d (as reproduced below) now fails with a backend ICE instead of a nice "expression … is void and has no value" error:
---
void Foo()
{
void[] bar;
void[] foo;
bar.length = 50;
foo.length = 50;
for(int i=0; i<50; i++)
{
foo[i] = bar[i];
}
}
---
DMD 2.061:
---
Internal error: backend/cod4.c 359
---
Maybe d_do_test should generally check the error messages for "Internal error" instead of just testing the exit value?
(In reply to comment #0)
> Maybe d_do_test should generally check the error messages for "Internal error"
> instead of just testing the exit value?
I added the code to check "Internal error: " message in the pull request.
Comment #3 by github-bugzilla — 2013-01-07T10:05:54Z