www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - cast(int) crashes dmd 0.112

reply zwang <nehzgnaw gmail.com> writes:
int main(){return cast(int)(.0>>0);}
Feb 03 2005
parent reply =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb algonet.se> writes:
zwang wrote:
 int main(){return cast(int)(.0>>0);}
With GDC, this returns:
 x.d:1: '0.0' is not of integral type, it is a double
 0
 double 0x19022e0
 d/dmd/expression.c:682: failed assertion `0'
 x.d:0: internal compiler error: Abort trap
Which is not a crash. --anders
Feb 03 2005
parent Thomas Kuehne <thomas-dloop kuehne.thisisspam.cn> writes:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Anders F Björklund schrieb am Thu, 03 Feb 2005 16:53:35 +0100:
 zwang wrote:
 int main(){return cast(int)(.0>>0);}
Added to DStress as http://dstress.kuehne.cn/run/bug_expression_661_B.d Note: The bug has shifted now to line 681 (gdc-0.10). Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFCArcC3w+/yD4P9tIRAlqCAJ0dW0wyYBOiaH0Iq2XpNa2SExGkXwCgzj6E n36D4ubYW+cK+HptF+fORwA= =soMM -----END PGP SIGNATURE-----
Feb 03 2005