From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27181 invoked by alias); 21 Jun 2007 16:48:43 -0000 Received: (qmail 27138 invoked by uid 48); 21 Jun 2007 16:48:33 -0000 Date: Thu, 21 Jun 2007 16:48:00 -0000 Message-ID: <20070621164833.27137.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/32393] gfortran - incorrect run time results In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "burnus at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2007-06/txt/msg01942.txt.bz2 ------- 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