b) problem: the attached file t.f when compiled with the options -O2 -fno-automatic produces an executable which gives the wrong output c) additional (may be useful) informations c1) the attached file t1.f is the same as t.f plus an additional subroutine which is not called. It still produces wrong output but different from case b) c2) both t.f and t1.f when compiled with the options: -O1 -fno-automatic or -O2 give correct output c3) previous gcc releases don't show the same "problem" Release: 3.1 Environment: ) output from gcc -v: Reading specs from /home/gcc31/bin/../lib/gcc-lib/i686-pc-linux-gnu/3.1/specs Configured with: ../gcc-3.1/configure --prefix=/home/carlo/gcc31/ --program-suffix=-3.1 --enable-languages=f77,c,c++,objc Thread model: single a) output from gcc -v: Reading specs from /home/gcc31/bin/../lib/gcc-lib/i686-pc-linux-gnu/3.1/specs Configured with: ../gcc-3.1/configure --prefix=/home/carlo/gcc31/ --program-suffix=-3.1 --enable-languages=f77,c,c++,objc Thread model: single gcc version 3.1 a) output from gcc -v: Reading specs from /home/gcc31/bin/../lib/gcc-lib/i686-pc-linux-gnu/3.1/specs Configured with: ../gcc-3.1/configure --prefix=/home/carlo/gcc31/ --program-suffix=-3.1 --enable-languages=f77,c,c++,objc Thread model: single gcc version 3.1 a) output from gcc -v: Reading specs from /home/gcc31/bin/../lib/gcc-lib/i686-pc-linux-gnu/3.1/specs Configured with: ../gcc-3.1/configure --prefix=/home/carlo/gcc31/ --program-suffix=-3.1 --enable-languages=f77,c,c++,objc Thread model: single gcc version 3.1 How-To-Repeat: untar the attached file you should obtain the file t.f and t1.f mentioned into the Description. Issue g77 -O2 -fno-automatic t.f Run the executable and you obtain the wrong output Issue g77 -O1 -fno-automatic t.f or g77 -O2 t.f Run the executable and you obtain the correct output
Responsible-Changed-From-To: unassigned->toon Responsible-Changed-Why: Fortran Maintainer.
State-Changed-From-To: open->analyzed State-Changed-Why: It's a regression, at least from 2.95.x onwards, possibly from 3.0.x onwards - hence marked `high priority'.
From: Toon Moene <toon@moene.indiv.nluug.nl> To: gcc-gnats@gcc.gnu.org, gcc-prs@gcc.gnu.org, toon@gcc.gnu.org, moretti@fe.infn.it Cc: Subject: Re: fortran/7278: g77 "bug"; the executable misbehave Date: Thu, 22 Aug 2002 23:04:39 +0200 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7278 It's probably x86 related - I can't reproduce the problem on my Titanium PowerBook (a PowerPC based system). Kind regards, Toon Moene.
State-Changed-From-To: analyzed->feedback State-Changed-Why: It is believed that a recent fix by Jan Hubicka to correct the compilation of SPECfp's sixtrack might also have fixed the problem you are seeing. Could you try the latest snapshot (20020909) and see if that is indeed the case ? Thanks.
State-Changed-From-To: feedback->closed State-Changed-Why: I've confirmed that this PR has been fixed, probably (as Toon suggests) by Jan's recent fixes. I checked that both t.f and t1.f did indeed produce different results between -O2 and -O2 -fno-automatic using g77 v3.1. Repeating the tests with current mainline however produces the same (correct) output.