Bug 4135 – Regression(1.034): ICE(statement.c): mixin in bad foreach, D1 only

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
Other
OS
Linux
Creation time
2010-04-30T17:31:00Z
Last change time
2014-02-15T02:19:43Z
Keywords
ice-on-invalid-code
Assigned to
nobody
Creator
ellery-newcomer

Comments

Comment #0 by ellery-newcomer — 2010-04-30T17:31:57Z
On compiling the files in the below zip file (with unittesting), I get dmd: statement.c:138: virtual int Statement::blockExit(): Assertion `0' failed. There's a fair deal of code in there, but I believe its coming from TestRecords, for anyone bothering to whittle this one down. http://personal.utulsa.edu/~ellery-newcomer/dxltest.zip
Comment #1 by bearophile_hugs — 2010-04-30T17:51:16Z
I don't think it's fair for Walter or Don to debug your code. So I suggest you to first of all merge all that code in a single module, then start removing parts and keep that ICE, until you reach to a short enough program to post here again.
Comment #2 by ellery-newcomer — 2010-04-30T20:04:52Z
I think it's fair for Walter or Don to debug their code. Anyways, I lied about TestRecords. This is as small as I care to get it: public int blitvisit()() { foreach(k; s.tupleof){ mixin(BlitX!()); } } void main(){ blitvisit!()(); }
Comment #3 by bearophile_hugs — 2010-05-01T03:08:37Z
If you post several modules here then you are asking people to debug your code. Your last code doesn't show the ICE, it just shows: test.d(2): Error: undefined identifier s
Comment #4 by clugdbug — 2010-08-14T13:14:47Z
This is D1-only. Reduced test case: void bug4125() { foreach(k; s){ mixin(""); } } -------- test0.d(384): Error: undefined identifier s test0.d(384): Error: cannot infer type for k Statement::blockExit(00C17914) mixin(""); Passed in 1.030, ICE in 1.034.
Comment #5 by bugzilla — 2011-12-19T10:00:27Z
Comment #6 by bugzilla — 2011-12-19T10:01:58Z