g77 bug?

Tim Prince tprince@computer.org
Sat Nov 2 09:10:00 GMT 2002


On Friday 01 November 2002 14:13, Toon Moene wrote:
> Jean-Pierre.Eckmann@physics.unige.ch wrote:
> > This seems to be an optimization bug in g77/gcc
> >
> > With Optimization <= O1 (only on file escape.f) the program gives
> > different results  from optimizing O2
>
> This sounds like the known problem that, on ix86 processors, sometimes
> increasing optimisation levels will result in more variables being kept
> in (80-bit) floating point registers, which will yield different
> rounding after operations and different results.
>
> On my powerpc-unknown-linux-gnu system, compilations with g77 -O0
> escape.f and g77 -O2 escape.f give identical results.
I have been unable to get any differences on a P-III, even when specifying 
options which imply extended precision floating point, using this week's 
gcc/g77-3.3 snapshot.  Neither the naming of the compiler in Makefile as f77 
nor the option -O6 conform with any implementation of gcc or g77 of which I 
am aware.  A few years ago, linux distributions set up an f77 command which 
employed f2c and a long forgotten version of gcc.  If you are using an 
ancient non-standard version of gcc for which -O6 has a meaning, you aren't 
likely to get useful responses.
Nor do I get any differences among options using a commercial compiler known 
for aggressive optimizations, although there are pages of diagnostics about 
the unnecessary use of non-portable Fortran extensions, and the formatting of 
the output makes it unreadable.
-- 
Tim Prince



More information about the Gcc-bugs mailing list