www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - Convoluted expression compiler failure

reply "Simon Buchan" <currently no.where> writes:
While exploring ways to roof a number (I know there is
going to be a function for it, but I want to figure it out for myself)
I ran into this:

ulong[cast(uint)((cast(float)<a  
type>.sizeof/ulong.sizeof)-int.max>>2)+int.max>>2] hexarray;

causes:
---------- Capture Output ----------
 "D:\dmd\bin\dmd.exe"  sourcelist -g -ofmain.exe -debug -v
parse bugtest semantic test1 semantic2 test1 semantic3 test1 bugtest.d(44): 'cast(float)(4) / cast(float)(8) - cast(float)(2147483647)' is not an integral type -4476578029612564480 Assertion failure: '0' on line 661 in file 'expression.c'
 Terminated with exit code 1.
-- "Unhappy Microsoft customers have a funny way of becoming Linux, Salesforce.com and Oracle customers." - www.microsoft-watch.com: "The Year in Review: Microsoft Opens Up"
Nov 29 2004
next sibling parent "Simon Buchan" <currently no.where> writes:
On Tue, 30 Nov 2004 01:14:20 +1300, Simon Buchan <currently no.where>  
wrote:

ulong[cast(uint)((cast(float)int.sizeof/ulong.sizeof)-int.max>>2)+int.max>>2]  
hexarray;

Still causes the failure in 1.07

-- 
"Unhappy Microsoft customers have a funny way of becoming Linux,
Salesforce.com and Oracle customers." - www.microsoft-watch.com:
"The Year in Review: Microsoft Opens Up"

"Clearly, if I were one of that Predator hunting team, I would file a
complaint with my local member asking why such an unsafe
environment should be allowed to continue, tradition or not."
- http://www.sydneyanglicans.net/culture/watching/alien_vs_predator/
Nov 30 2004
prev sibling next sibling parent Thomas Kuehne <thomas-dloop kuehne.thisisspam.cn> writes:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Added to DStress as
http://svn.kuehne.cn/dstress/run/bug_expression_661_A.d

Thomas

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.9.9 (GNU/Linux)

iD8DBQFBrXgA3w+/yD4P9tIRAiFZAKDHNaYesi+4ftwMcowymfiTCNkzGwCeLzBc
3rlGQqAGADEJ/9N7McbG1GA=
=24tj
-----END PGP SIGNATURE-----
Nov 30 2004
prev sibling parent reply "Walter" <newshound digitalmars.com> writes:
It's fixed now. -Walter
Dec 01 2004
parent "Simon Buchan" <currently no.where> writes:
On Wed, 1 Dec 2004 17:06:55 -0800, Walter <newshound digitalmars.com>  
wrote:

 It's fixed now. -Walter
Still breaks in 1.09 :( -- "Unhappy Microsoft customers have a funny way of becoming Linux, Salesforce.com and Oracle customers." - www.microsoft-watch.com: "The Year in Review: Microsoft Opens Up"
Dec 05 2004