Bug 13497 – [REG2.065] [ICE e2ir 1911] Array op compiler error

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-09-19T11:16:00Z
Last change time
2015-02-18T03:37:15Z
Keywords
ice, pull
Assigned to
nobody
Creator
growlercab
See also
https://issues.dlang.org/show_bug.cgi?id=12179

Comments

Comment #0 by growlercab — 2014-09-19T11:16:23Z
The two "main()" below both result in the same ICE e2ir.c:1911 using dmd 2067-devel --- void main() { int[1] a; auto tmp = (a[] * a[])[]; } /*void main() { double[] p = [-1, -2, -3, -4]; double[] origin = [1, 2, 3, 4]; auto shiftedPoint = (p[] - origin[])[]; }*/ --- Internal error: e2ir.c 1911 I'm opening this as a new issue but it may be a duplicate of 12179. System: Arch x86_64. DMD64 D Compiler v2.066.0 or DMD64 D Compiler v2.067-devel-5606406 Cheers, gc
Comment #1 by dlang-bugzilla — 2014-09-21T01:42:29Z
It should emit an error: test.d(3): Error: Array operation a[] * a[] not implemented This is a regression. Introduced in https://github.com/D-Programming-Language/dmd/pull/2960
Comment #2 by k.hara.pg — 2014-09-21T04:09:59Z
Comment #3 by github-bugzilla — 2014-09-21T07:05:45Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/141d1bed9032ebc1c9cd89c2febe6005756b1cfa fix Issue 13497 - [ICE e2ir 1911] Array op compiler error https://github.com/D-Programming-Language/dmd/commit/74a18b2c3453fa9b6ddc41565a86a072870f19d4 Merge pull request #4007 from 9rnsr/fix13497 [REG2.065] Issue 13497 - [ICE e2ir 1911] Array op compiler error
Comment #4 by k.hara.pg — 2014-09-21T15:57:56Z
Sorry my fix was incomplete. I found some unfixed cases. void main() { int[1] a; //auto b1 = (a[] * a[])[]; // error, expected auto b2 = (a[] * a[])[0..1]; // Internal error: e2ir.c 1911 int[] c; //c = (a[] * a[])[]; // error, expected c = (a[] * a[])[0..1]; // Internal error: e2ir.c 1911 }
Comment #5 by k.hara.pg — 2014-09-21T16:08:47Z
Comment #6 by github-bugzilla — 2014-09-30T03:20:28Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/3fa41f4d2d4e1210518898caa1248565e04f4c7d fix issue 13497 remained case `AssignExp::semantic` should handle cases in both valid and invalid array operations. https://github.com/D-Programming-Language/dmd/commit/518801d54a1364d26f9b30cf1fde4d53f6c254da Merge pull request #4011 from 9rnsr/fix_arrayop [REG2.065] Issue 13497 & 12381 - fix remaind e2ir ICE around array ops
Comment #7 by github-bugzilla — 2015-02-18T03:37:15Z