This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [PATCH][RFC] Add PAREN_EXPR, make flag_associative_math the default for Fortran
- From: dominiq at lps dot ens dot fr (Dominique Dhumieres)
- To: fortran at gcc dot gnu dot org
- Date: Thu, 03 Jan 2008 00:19:02 +0100
- Subject: Re: [PATCH][RFC] Add PAREN_EXPR, make flag_associative_math the default for Fortran
I have found what's wrong for my test with the patch.
A reduced test case is:
real function anint4(x, a, b, c)
real, parameter :: f = 2.0**23
real x, a, b, c, d, e
anint4 = x
a = abs(x)
if (a < f) then
anint4 = (f+a) - f
b = anint4
c = (anint4 - 0.5) - a
if (c > 0.0) then
anint4 = anint4 - 1.0
end if
end if
end function anint4
If I diff the results of -fdump-tree-optimized with and without
-ffast-math I get:
23c23
< D.840 = ((__result_anint4)) - D.832;
---
> D.840 = ((__result_anint4 - 5.0e-1)) - D.832;
Do you understand why -ffast-math eats the '-0.5'?
Dominique