This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/43716] [4.6/4.7/4.8 Regression] Revision 158105 miscompiles doduc.f90
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 23 Jul 2012 08:12:55 +0000
- Subject: [Bug tree-optimization/43716] [4.6/4.7/4.8 Regression] Revision 158105 miscompiles doduc.f90
- Auto-submitted: auto-generated
- References: <bug-43716-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43716
--- Comment #40 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-07-23 08:12:55 UTC ---
tree if-conversion happily executes both arms of the conditional
unconditionally
with -ffast-math, so for example
if (x != 0)
tem = y / x;
else
tem = 0.;
... do sth with tem ...
will execute y / x unconditionally based on the fact that it cannot trap.
So simply generation of NaNs is not what you should check for, but
"usage" of 'tem' with NaN in the above should be (it shouldn't be used
if x is zero).