This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/50904] [4.7 regression] pessimization when -fno-protect-parens is enabled by -Ofast
- From: "rguenther at suse dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 02 Dec 2011 15:02:27 +0000
- Subject: [Bug rtl-optimization/50904] [4.7 regression] pessimization when -fno-protect-parens is enabled by -Ofast
- Auto-submitted: auto-generated
- References: <bug-50904-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50904
--- Comment #26 from rguenther at suse dot de <rguenther at suse dot de> 2011-12-02 15:02:27 UTC ---
On Fri, 2 Dec 2011, burnus at gcc dot gnu.org wrote:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50904
>
> Tobias Burnus <burnus at gcc dot gnu.org> changed:
>
> What |Removed |Added
> ----------------------------------------------------------------------------
> CC|burnus@net-b.de |dominiq at lps dot ens.fr
>
> --- Comment #25 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-12-02 14:40:48 UTC ---
> (In reply to comment #24)
> > Every program that would break with non honoring explicit parantheses
> > would also break if the bracketed expression would be explicitely
> > computed into a temporary (without explicit parantheses). So it
> > should be easy to construct a testcase if you have one that breaks
> > without -fno-protect-parens.
>
> I vaguely recall that one of the Polyhedron benchmarks gets minutely out of the
> correctness-check tolerance range with -fno-protect-parens while it stays
> within without. I think Dominique has a program where the effect is more
> disastrous.
The trivial example is (x + 2**52) - 2**52 which rounds x to
an integer. Without parens we optimize away that rounding effect.
Thus,
real*8 x, tem
x = 1.3d
tem = x + 2.d**52
x = tem - 2.d**52
if (x.ne.1.0d)
call abort
should not fail (minus my fortran coding errors ;)) with
-fprotect-parens