This is the mail archive of the
mailing list for the GCC project.
Re: Revision 162491 -- fortran -fwhole-file regressions
Dave Korn wrote:
On 24/07/2010 07:39, Tobias Burnus wrote:
I think reverting the patch is the wrong solution. If you use
-ffloat-store, the tests are successful. The reason is that one now
inlines the function and uses the result from the register instead from
memory. And as the x87 coprocessor has an excess precision, the
comparison fails. As on x86-64 one uses SSE it works there.
Ah, this is Return of the Revenge of PR323 Strikes Back! :-P
Could fortran be made to usefully implement -fexcess-precision=standard?
I'm surprised this hasn't been more of an issue given the prevalence of big
number-crunching apps in the fortran world.
That is because Fortran (the Language) makes no promises. All
arithmetic is "an approximation to the mathematically exact result".
So basically, if you really, really want to compare two REALs (or DOUBLE
PRECISION numbers) for equality, you have to know what you're doing.
Toon Moene - e-mail: email@example.com - phone: +31 346 214290
Saturnushof 14, 3738 XG Maartensdijk, The Netherlands
At home: http://moene.org/~toon/; weather: http://moene.org/~hirlam/
Progress of GNU Fortran: http://gcc.gnu.org/gcc-4.5/changes.html#Fortran