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
Reduced: void main() { int[][] a; a = [a[1][] - a[0][]]; } Internal error: e2ir.c 1910
Comment #2 by yebblies — 2014-07-27T07:31:37Z
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.
Comment #3 by k.hara.pg — 2014-07-27T13:00:55Z
This is a regression from 2.065, as same as bug 12179 and bug 12769. https://github.com/D-Programming-Language/dmd/pull/3818
Comment #4 by github-bugzilla — 2014-07-27T21:26:48Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/707b8d9a75a5760bd00def073bb3f9ebfe628105 fix Issue 13208 - [ICE](e2ir.c 2077) with array operation https://github.com/D-Programming-Language/dmd/commit/e15bd198729065936fbd6de148dc484e063fe8a4 Merge pull request #3818 from 9rnsr/fix13208 [REG2.065] Issue 13208 - [ICE](e2ir.c 2077) with array operation
Comment #5 by github-bugzilla — 2014-07-31T02:35:10Z
Commit pushed to 2.066 at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/043a2e3c079eb96fa4f8a1a472b20701b8f45489 Merge pull request #3818 from 9rnsr/fix13208 [REG2.065] Issue 13208 - [ICE](e2ir.c 2077) with array operation
Comment #6 by github-bugzilla — 2014-08-22T08:04:57Z