[Bug c/64442] -O1 modify output of a simple computation with rounding

2014-12-30 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64442 Manuel López-Ibáñez changed: What|Removed |Added CC||manu at gcc dot gnu.org --- Commen

[Bug c/64442] -O1 modify output of a simple computation with rounding

2014-12-30 Thread colin.pitrat+gcc at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64442 Colin Pitrat changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug c/64442] -O1 modify output of a simple computation with rounding

2014-12-30 Thread mikpelinux at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64442 --- Comment #3 from Mikael Pettersson --- See PR323 and https://gcc.gnu.org/bugs/#known You could experiment with -ffloat-store, -mpc64, or -msse2 (if your CPU supports SSE2, which it should if it isn't ancient).

[Bug c/64442] -O1 modify output of a simple computation with rounding

2014-12-30 Thread colin.pitrat+gcc at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64442 --- Comment #2 from Colin Pitrat --- Yes I'm building on i686. But I thought -O1 and -O2 were safe optimization that weren't supposed to change the behaviour. Moreover, I'm surprised that providing the list of -f flags -O1 is supposed to enable

[Bug c/64442] -O1 modify output of a simple computation with rounding

2014-12-30 Thread mikpelinux at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64442 --- Comment #1 from Mikael Pettersson --- Are you compiling on 32-bit x86? I can reproduce on m68k, but not on x86_64 (even with -m32) or on ARMv5. I suspect you're seeing the effects of excess precision of the x87 FPU (much like the m68k FPU).