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: 21 Jun 2007 16:48:33 -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 #18 from burnus at gcc dot gnu dot org 2007-06-21 16:48 -------
> Created an attachment (id=13759)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13759&action=view) [edit]
> Warning free version
Thanks, it finally compiles with NAG "f95 -dusty", which finds directly one
problem:
Subscript 1 of IA (value 2) is out of range (1:1)
In PRMX, line 134 of test.f
I changed ia(1) to ia(20) - then it works. Actually, it works on my system
(x86_64-unknown-linux-gnu, 4.3.0 20070621) up to the option
-O3 -ffast-math -ftree-vectorize -funroll-all-loops
It also works now with ifort -O3 -xW, NAG f95, sunf95 and gfortran 4.1.0.
Interestingly, both gfortran 4.2.0 and g95 now produce (no options) for the
first matrix:
row 1 0.0000E+00
row 2 0.1000E+01 0.2000E+01
row 3 0.3000E+01 0.4000E+01 0.5000E+01
g95 produces the same result as the others using "-fzero". Using NAG f95 with
-nan the program crashes with an arithmetic exception, which means that either
cc or sum in vr2 must be uninitialized when calling scprod. (-nan initializes
the variables with signalling NaN.) Thus there is still a bug lurking in the
source code.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32393