Bug 1665 – Internal error: ..\ztc\cod2.c 411

Status
RESOLVED
Resolution
FIXED
Severity
critical
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Windows
Creation time
2007-11-13T06:00:00Z
Last change time
2014-02-24T15:33:33Z
Keywords
ice-on-valid-code
Assigned to
bugzilla
Creator
keystuffs

Comments

Comment #0 by keystuffs — 2007-11-13T06:00:45Z
Sorry, i have no sample code. I get this error while compiling with the switch -O. dmd test.d -release (OK) dmd test.d -inline (OK) dmd test.d -O Internal error: ..\ztc\cod2.c 411
Comment #1 by keystuffs — 2007-11-13T07:12:53Z
Here is the code: class Ap { private uint value; private ulong size; public void update(ubyte[] input, int len) { uint tmp = value; for (int i = 0; i < len; i++) { tmp ^= (((size + i) & 1) == 0) ? ((tmp << 7) ^ input[i] ^ (tmp >> 3)) : (~((tmp << 11) ^ input[i] ^ (tmp >> 5))); } value = tmp; } } int main(char[][] params) { return 0; } If I replace my code: tmp ^= (((size + i) & 1) == 0) ? ((tmp << 7) ^ input[i] ^ (tmp >> 3)) : (~((tmp << 11) ^ input[i] ^ (tmp >> 5))); by this code: tmp ^= ((size & 1) == 0) ? ((tmp << 7) ^ input[i] ^ (tmp >> 3)) : (~((tmp << 11) ^ input[i] ^ (tmp >> 5))); size++; dmd doesn't crash anymore.
Comment #2 by bugzilla — 2007-12-04T23:36:25Z
Fixed dmd 1.024 and 2.008