[dmd-internals] 64bit bad codegen from ulong pointers.
Don Clugston
dclugston at googlemail.com
Mon Jan 3 01:26:17 PST 2011
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