Bug 13588 – ICE at comparison [0] == 0

Status
RESOLVED
Resolution
DUPLICATE
Severity
major
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2014-10-08T13:27:00Z
Last change time
2014-10-08T14:09:15Z
Assigned to
nobody
Creator
valeriy.fedotov

Attachments

IDFilenameSummaryContent-TypeSize
1444test.dThis code leads to ICE.application/x-dsrc229

Comments

Comment #0 by valeriy.fedotov — 2014-10-08T13:27:00Z
Created attachment 1444 This code leads to ICE. int correctBigNum(short[] x) { if (x.length == 0 && [0] == 0) { return true; } foreach(i; 0..x.length) { if (x[i] <= 0 || x[i] >= 10000) { return false; } } return true; } compiling this code leads to message Internal error: e2ir.c 1910 (in the last 2.067.0-b1 in stable 2.066 the error is also present, but line number in e2ir is different.) As you should note, I just for forgot to insert x before [0] in the first line of function body.
Comment #1 by k.hara.pg — 2014-10-08T14:09:15Z
It's a dup of issue 13382, and it's already fixed in git-head. *** This issue has been marked as a duplicate of issue 13382 ***