[Bug c/29186] optimzation breaks floating point exception flag reading

joseph at codesourcery dot com gcc-bugzilla@gcc.gnu.org
Sat Sep 23 23:02:00 GMT 2006



------- Comment #10 from joseph at codesourcery dot com  2006-09-23 23:02 -------
Subject: Re:  optimzation breaks floating point exception flag
 reading

On Sat, 23 Sep 2006, kreckel at ginac dot de wrote:

> I am still not entirely sure whether we are really talking about the same
> problem. The original problem was that the compiler optimized assuming that the
> floating point division cannot have side effects, such that the offending
> division happens after the call to fetestexcept(3):

> Neither -ftrapping-math, nor -frounding-math change anything, as long as -O1 is
> turned on: The printf inside the if statement is *not* executed.

In that case you have a bug that is not a duplicate of the lack of 
FENV_ACCESS pragma support.  The relevant semantics are meant to be 
supported by these command line options.


-- 


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



More information about the Gcc-bugs mailing list