This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/32393] gfortran - incorrect run time results
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Jun 2007 16:20:50 -0000
- Subject: [Bug fortran/32393] gfortran - incorrect run time results
- References: <bug-32393-10129@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #13 from burnus at gcc dot gnu dot org 2007-06-20 16:20 -------
> However, the problem that gfortran is having with the program is that it does
> not take the full effect of the "equivalence (jt,tt)" into account. This is
> where the real problem is and where I expected some disagreement.
I would not be surprised if some bug is lurking there, but my problem is that
if the program is invalid and produces different results with different
compilers, it is a bit difficult to pinpoint the problem.
What is actually the expected result? Depending on the compiler and compiler
setting, I get completely different results for the second triangular matrix.
(The first matrix remains always the same.)
NAG f95 -dusty refuses to compile the program.
gfortran with -O0 to -O3, sunf95 (default settings), g95 (-O0) and Intel's
ifort (-O1) give:
row 1 0.1600E+02
row 2 0.9000E+01 0.2000E+02
row 3 0.1100E+02 0.1200E+02 0.2600E+02
ifort -O2 (= ifort w/ default settings) and gfortran -O3 -ffast-math give:
row 1 0.0000E+00
row 2 0.9000E+01 0.0000E+00
row 3 0.1100E+02 0.1200E+02 0.0000E+00
g95 -O2 gives:
row 1 0.8000E+01
row 2 0.9000E+01 0.1000E+02
row 3 0.1100E+02 0.1200E+02 0.1300E+02
Thus which compiler is right? Are all right? What exactly is the bug / expected
output? Is it fixed meanwhile as I get for -O3 w/o -ffast-math the same output
as for -O0?
Is it platform dependent? I use 4.3.0 20070620 (x86_64-unknown-linux-gnu) and
the unmodified version (or equivalently the version as modified by Dominique).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32393