This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/23109] [4.1 Regression] compiler generates wrong code leading to spurious division by zero with -funsafe-math-optimizations (instead of -ftrapping-math)
- From: "bonzini at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 Oct 2005 12:00:13 -0000
- Subject: [Bug tree-optimization/23109] [4.1 Regression] compiler generates wrong code leading to spurious division by zero with -funsafe-math-optimizations (instead of -ftrapping-math)
- References: <bug-23109-1396@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #6 from bonzini at gcc dot gnu dot org 2005-10-14 12:00 -------
I'm not sure this is really fixed.
With this test case,
float a = g();
printf ("%g\n", a);
printf ("%g\n", 2 / a);
printf ("%g\n", 3 / a);
the division is inserted before the *first* printf, while I believe it should
be inserted before the second.
The patch in pr23948 tries to insert reciprocals before the use point, rather
than after the def point, which would fix this as well.
Should this bug be reopened?
--
bonzini at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
BugsThisDependsOn| |23948
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23109