https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113679
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |DUPLICATE --- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> --- [apinski@xeond2 gcc]$ ~/upstream-gcc/bin/gcc -m32 tr56.c [apinski@xeond2 gcc]$ ./a.out -2.000000 [apinski@xeond2 gcc]$ ~/upstream-gcc/bin/gcc -m32 tr56.c -fexcess-precision=standard [apinski@xeond2 gcc]$ ./a.out 0.000000 [apinski@xeond2 gcc]$ ~/upstream-gcc/bin/gcc -m32 tr56.c -msse2 -mfpmath=sse [apinski@xeond2 gcc]$ ./a.out 0.000000 Yes it is due to excessive precision of x87. Use either `-fexcess-precision=standard` or `-msse2 -mfpmath=sse` if you don't want to use the execessive precision of the x87 FP. *** This bug has been marked as a duplicate of bug 323 ***