[Issue 13474] 32 bit DMD optimizer FP arithmetic bug

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sun Feb 8 01:27:05 PST 2015


https://issues.dlang.org/show_bug.cgi?id=13474

--- Comment #9 from Илья Ярошенко <ilyayaroshenko at gmail.com> ---
(In reply to yebblies from comment #8)
> (In reply to Илья Ярошенко from comment #6)
> > F foo(F)(F c, F d) {
> >     c += d;
> >     c += d;
> >     return c;
> > }
> > 
> > void test1() {
> >     alias F = double;
> >     enum F d = (cast(F)(2)) ^^ (F.max_exp - 1);
> >     assert(foo(-d, d) == d);
> > }
> 
> That doesn't fail for me on win32 with -O.

Can you open https://github.com/D-Programming-Language/dmd/pull/3992 please?

--


More information about the Digitalmars-d-bugs mailing list