[Bug 54] New: Compiler segfault on zero length static array

Thomas Kuehne thomas-dloop at kuehne.cn
Sat Mar 18 23:44:22 PST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

d-bugmail at puremagic.com schrieb am 2006-03-16:
> template declare(X) { X declare; }
> typeof(declare!(int[0]).ptr[0]) y;

http://www.digitalmars.com/d/declaration.html#type
# typeof ( Expression )
# Expression is not evaluated, just the type of it is generated

Thus Oscar is right in classifying this as "ice-on-valid-code".

Added to DStress as
http://dstress.kuehne.cn/run/t/typeof_09_A.d
http://dstress.kuehne.cn/run/t/typeof_09_B.d
http://dstress.kuehne.cn/run/t/typeof_09_C.d
http://dstress.kuehne.cn/run/t/typeof_09_D.d
http://dstress.kuehne.cn/run/t/typeof_09_E.d
http://dstress.kuehne.cn/run/t/typeof_09_F.d
http://dstress.kuehne.cn/run/t/typeof_09_G.d
http://dstress.kuehne.cn/run/t/typeof_09_H.d

Thomas


-----BEGIN PGP SIGNATURE-----

iD8DBQFEHQhW3w+/yD4P9tIRAutWAJsHWipS14VRiooPuCaxzxZ//hTGXACgkYPk
zF3pUbn9gB3eMil9F+fw0Lo=
=k0Tx
-----END PGP SIGNATURE-----



More information about the Digitalmars-d-bugs mailing list