Thread overview
Convoluted expression compiler failure
Nov 29, 2004
Simon Buchan
Nov 30, 2004
Simon Buchan
Dec 01, 2004
Thomas Kuehne
Dec 02, 2004
Walter
Dec 05, 2004
Simon Buchan
November 29, 2004
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"
November 30, 2004
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/
December 01, 2004
-----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-----
December 02, 2004
It's fixed now. -Walter


December 05, 2004
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"