https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92164

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Steffen Schmidt from comment #3)
> Thanks for the quick reply.
> 
> Just tested using -frounding-math and it seems to fix the issue. 
> Sorry, I was not aware of this option, according to GCCs manual it is
> experimental.
> 
> Please correct me if I'm wrong, but my expectation would be, assuming a
> correct program, switching from -O0 to -O1 should not influence the runtime
> result.

GCC assumes you do not mess with the floating-point state but round-to-nearest
is in effect.  You have to use -frounding-math to remove this assumption but
then still correct operation isn't guaranteed (thus the "experimental" tag
for this option).

Reply via email to