[dmd-internals] 64bit bad codegen from ulong pointers.
Walter Bright
walter at digitalmars.com
Mon Jan 3 14:37:29 PST 2011
Works when I try it. Do you have the latest dmd?
Don Clugston wrote:
> Reduced test case from std.math. *ps is 0x800F_FFFF_FFFF_FFFF, yet
> the if() branch is not taken.
> This one looks as though it might be the root cause of many failures.
>
> void check(double x)
> {
> ulong *ps = cast(ulong *)&x;
> if (*ps & 0x8000_0000_0000_0000) {}
> else assert(x>=0);
> }
>
> void main()
> {
> check(-double.min_normal*double.epsilon);
> }
>
>
More information about the dmd-internals
mailing list