A Bug of gfortran, g77 and g95 on default optimization

Tobias Burnus burnus@net-b.de
Mon Jun 18 15:25:00 GMT 2007


Sunjoong Lee wrote:
> I had traced side effects of optimization levels for the legacy program;
>    -O0 level and -O1 level were different
>    but from -O1 to -O3 gave same (wrong) results on gfortran, g77 and
> g95.
>    I tested it with pgi fortran and got same (right) results.
>
> I checked gfortran 4.0.4, 4.1.2 and 4.2.0.
As said: It works here with 4.1.3 20070521, 4.2.1 20070604 and 20070618,
4.3.0 20070618. It also work with my g95, Intel Fortran and sunf95
compilers. In all cases I get:

Aligned length=  91, RMSD=  6.35, TM-score=0.24762, ID=0.024

I'm on x86_64-unknown-linux-gnu (openSUSE Factory) and it works both in
32 and 64 bit mode with no option, -O0, -O1, -O2, -O3, -O3 -ffast-math.


What is your platform (CPU type and operating system) and what is your
exact version of gfortran? (Both information is shown by "gfortran -v".)
(You are really only using "-O1" and not any other flags, are you?)

Tobias



More information about the Fortran mailing list