[Bug target/55939] [4.6/4.7/4.8 regression] gcc miscompiles gmp-5.0.5 on m68k-linux

aldyh at redhat dot com gcc-bugzilla@gcc.gnu.org
Tue Jan 29 19:47:00 GMT 2013


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55939

--- Comment #16 from Aldy Hernandez <aldyh at redhat dot com> 2013-01-29 19:47:24 UTC ---
>>       double d, d2;
>>       ...
>>       if (d != d2) {
>>       dumpd(d,d2);
>>           return -1;
>>       }
>>
>> By this point, "d" and "d2" are in fp2/fp3, and we compare them in
>> extended-precision real mode (fcmp.x) below:
> At this point alarm bells are already ringing...  When I see EQ/NE
> comparisons of floating points, there's a good bet something is wrong.

For the record, only the EQ/NE above comes from GMP.  The other one (in 
dumpd()) I added myself in testing.  But yes, that one "d != d2" is in 
the original testcase.

I will try the various suggestions and report back.

Thanks everyone.



More information about the Gcc-bugs mailing list