fortran optimization errors

Tobias Burnus burnus@net-b.de
Fri Jun 22 21:17:00 GMT 2007


Sebastian Sandersius wrote:
> gcc version 4.1.1 20070105 (Red Hat 4.1.1-51)
Could you try with a gfortran 4.2.x or gfortran 4.3 compiler; it might
be that this problem is already fixed.
You find pre-compiled gfortran 4.3 at
http://gcc.gnu.org/wiki/GFortranBinaries

> The optimizations I tried were:
> (2)    f95 semn17.f90 rng.f90 -o n17
> (3)    f95 -O2 semn17.f90 rng.f90 -o n17
> An example of the numerical output:
> (2)     1.032397734218777E-002
> (3)     1.035838362773763E-002
For -O2 I would not expect this discrepancy.
If using gfortran 4.2 or 4.3 does not help, could you
again compile (2) and (3) but using addionally the
option -ffloat-store.

I would guess that it is a 4.1.1 vs. 4.3.0 problem (i.e. a fixed bug) as
both the apple and the linux are x86 systems.

Tobias



More information about the Fortran mailing list