Bug 13208 – [ICE](e2ir.c 2077) with array operation
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-07-27T00:43:00Z
Last change time
2014-08-22T08:04:57Z
Keywords
ice, pull
Assigned to
k.hara.pg
Creator
Dlang
Comments
Comment #0 by Dlang — 2014-07-27T00:43:50Z
Internal Error e2ir.c 2077 is thrown if line 40 of the code here is included.
http://pastebin.com/RefD9hzg
Separating the array operations as seen here:
http://pastebin.com/aX6edUvg
eliminates the error.
#D on freenode tells me this error should never be thrown, so I thought I would submit it.
Comment #1 by bearophile_hugs — 2014-07-27T05:51:44Z
Adding this chunk inside ArrayLiteralExp::semantic fixes it
for(size_t i = 0; i < elements->dim; i++)
{
Expression *el = (*elements)[i];
if (isNonAssignmentArrayOp(el))
{
el->error("array operation %s without assignment not implemented", el->toChars());
return new ErrorExp();
}
}
But I'll leave this to Kenji as IIRC he did this rest of this checking and would know best. I'm sure there are other places this check needs to be added.