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.