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'?