Bug 381 – array literals are broken; Internal error: ..\ztc\cod1.c 2525

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Windows
Creation time
2006-09-27T12:25:00Z
Last change time
2014-02-15T13:18:37Z
Keywords
ice-on-valid-code, wrong-code
Assigned to
bugzilla
Creator
h3r3tic

Comments

Comment #0 by h3r3tic — 2006-09-27T12:25:12Z
void foo(...) { } void main() { int[] arr; arr = [1] ~ 2; // runtime crash, the length == 1 assert (arr.length == 2); // compile-time crash foo([1] ~ 2); }
Comment #1 by thomas-dloop — 2006-09-29T02:05:36Z
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 [email protected] schrieb am 2006-09-27: > http://d.puremagic.com/issues/show_bug.cgi?id=381 > void foo(...) { > } > > > void main() { > int[] arr; > arr = [1] ~ 2; > > // runtime crash, the length == 1 > assert (arr.length == 2); > > // compile-time crash > foo([1] ~ 2); > } An additional message triggered on Linux is: Internal error: ../ztc/cgcod.c 1504 Added to DStress as http://dstress.kuehne.cn/run/o/opCat_24_A.d http://dstress.kuehne.cn/run/o/opCat_24_B.d http://dstress.kuehne.cn/run/o/opCat_24_C.d http://dstress.kuehne.cn/run/o/opCat_24_D.d Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFFHDBMLK5blCcjpWoRAveEAJ9u12E9nm+oEH634kXDNLhlcFjpuwCfe26/ plId/SYmuhSqyKLywo7L7LM= =USzF -----END PGP SIGNATURE-----
Comment #2 by bugzilla — 2006-10-10T03:28:09Z
Fixed DMD 0.169