This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
FORTRAN compiler optimisation bug
- To: gcc-bugs at gcc dot gnu dot org
- Subject: FORTRAN compiler optimisation bug
- From: John Sturton <john dot sturton at sescoi dot fr>
- Date: Mon, 13 Dec 1999 09:30:13 +0100
- Organization: Sescoi S.A., France
The attached file demonstrates a FORTRAN compiler bug when compiling
with -O.
Cheers,
John Sturton
% cat g77-bug-1.f
subroutine g77bug()
real d1,d2
if (d1.lt.0.1) d2=0.0
if (d1.lt.0.2) d2=0.1
if (d2.lt.0.5) d2=0.1
end
% g77 -c g77-bug-1.f -O -v
g77 version 2.95.1 19990816 (release) (from FSF-g77 version 0.5.25 19990816 (release))
Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.6/2.95.1/specs
gcc version 2.95.1 19990816 (release)
/usr/local/lib/gcc-lib/sparc-sun-solaris2.6/2.95.1/f771 g77-bug-1.f -quiet -dumpbase g77-bug-1.f -O -Wunused -version -fversion -o /var/tmp/ccU4of6S.s
GNU F77 version 2.95.1 19990816 (release) (sparc-sun-solaris2.6) compiled by GNU C version 2.95.1 19990816 (release).
GNU Fortran Front End version 0.5.25 19990816 (release)
g77-bug-1.f: In subroutine `g77bug':
g77-bug-1.f:7: Internal compiler error in `final_scan_insn', at final.c:2920
Please submit a full bug report.
See <URL:http://www.gnu.org/software/gcc/faq.html#bugreport> for instructions.
Compilation finished at Fri Dec 3 09:57:56