From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20337 invoked by alias); 21 Jun 2007 16:29:17 -0000 Received: (qmail 20282 invoked by uid 48); 21 Jun 2007 16:29:03 -0000 Date: Thu, 21 Jun 2007 16:29:00 -0000 Message-ID: <20070621162903.20281.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: "dir at lanl dot gov" 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/msg01939.txt.bz2 ------- Comment #17 from dir at lanl dot gov 2007-06-21 16:29 ------- I have attached version that generates no warnings with gfortran or g95. As I reduced, it the bug changed - that is the problem with optmization bugs - they are hard to trap. Anyway there is still a bug for some compilers. gfortran on the Macintosh and Linux are Ok. g77 is happy and gets the correct answer - [dranta:~/tests] dir% g77 -o g95Test02 g95Test02.f [dranta:~/tests] dir% g95Test02 1 lower triangular matrix with 3 rows row 1 0.8000E+01 row 2 0.9000E+01 0.1000E+02 row 3 0.1100E+02 0.1200E+02 0.1300E+02 iprec = 1 1 lower triangular matrix with 3 rows row 1 0.1600E+02 row 2 0.9000E+01 0.2000E+02 row 3 0.1100E+02 0.1200E+02 0.2600E+02 g95 cannot decide which wrong answer it likes - [dranta:~/tests] dir% g95 -Wall -g -o g95Test02 g95Test02.f [dranta:~/tests] dir% g95Test02 1 lower triangular matrix with 3 rows row 1 -0.2000E+01 row 2 0.1000E+01 0.2000E+01 row 3 0.3000E+01 0.4000E+01 0.5000E+01 iprec = 1 1 lower triangular matrix with 3 rows row 1 -0.3999E+01 row 2 0.1000E+01 0.4000E+01 row 3 0.3000E+01 0.4000E+01 0.1000E+02 [dranta:~/tests] dir% g95 -Wall -O3 -o g95Test02 g95Test02.f [dranta:~/tests] dir% g95Test02 1 lower triangular matrix with 3 rows row 1 0.8000E+01 row 2 0.9000E+01 0.1000E+02 row 3 0.1100E+02 0.1200E+02 0.1300E+02 iprec = 1 1 lower triangular matrix with 3 rows row 1 0.8000E+01 row 2 0.9000E+01 0.1000E+02 row 3 0.1100E+02 0.1200E+02 0.1300E+02 gfortran (i386-pc-mingw32) on windows now gets the wrong answer with -O3 - rantad@XP-RANTAD ~/tests $ gfortran -g -o g95Test02 g95Test02.f rantad@XP-RANTAD ~/tests $ g95Test02 1 lower triangular matrix with 3 rows row 1 0.8000E+01 row 2 0.9000E+01 0.1000E+02 row 3 0.1100E+02 0.1200E+02 0.1300E+02 iprec = 1 1 lower triangular matrix with 3 rows row 1 0.1600E+02 row 2 0.9000E+01 0.2000E+02 row 3 0.1100E+02 0.1200E+02 0.2600E+02 rantad@XP-RANTAD ~/tests $ gfortran -O3 -o g95Test02 g95Test02.f rantad@XP-RANTAD ~/tests $ g95Test02 1 lower triangular matrix with 3 rows row 1 0.0000E+00 row 2 0.1000E+01 0.2000E+01 row 3 0.3000E+01 0.4000E+01 0.5000E+01 iprec = 1 1 lower triangular matrix with 3 rows row 1 0.0000E+00 row 2 0.1000E+01 0.4000E+01 row 3 0.3000E+01 0.4000E+01 0.1000E+02 rantad@XP-RANTAD ~/tests $ gfortran --v Using built-in specs. Target: i386-pc-mingw32 Configured with: ../trunk/configure --prefix=/mingw --enable-languages=c,fortran --with-gmp=/home/coudert/local --disable-nls --with-ld=/mingw/bin/ld --with-as=/mingw/bin/as --disable-werror --enable-bootstrap --enable-threads --build=i386-pc-mingw32 --disable-shared --enable-libgomp Thread model: win32 gcc version 4.3.0 20070522 (experimental) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32393