--- geo2.f --- c g77 -c -O2 -fno-force-mem geo2.f c geo2.f: In subroutine `geo2': geo2.f:13: internal compiler error: in fixup_var_refs_1, at function.c:1947 c Please submit a full bug report, c with preprocessed source if appropriate. c See <URL:http://gcc.gnu.org/bugs.html> for instructions. subroutine geo2() implicit none integer ms,n,ne(2) ne(1) = 1 ne(2) = 2 ms = 1 call call_me(ne(1)*ne(1)) n = ne(ms) end --- geo2.f end--- [kirr@roro psi]$ g77 -v Reading specs from /mnt/tmini/kirr/local/gcc-3.3.2/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/specs Configured with: ../gcc-3.3.2/configure --prefix=/mnt/tmini/kirr/local/gcc-3.3.2 --with-gnu-as --with-gnu-ld --enable-threads=posix --enable-languages=c,c++,f77 --enable-checking --disable-nls Thread model: posix gcc version 3.3.2
Probably target specific, as I cannot reproduce it on powerpc-unknown-linux-gnu.
I can confirm this with the mainline and it is a regression from 2.95.3.
Confirmed with gcc version 3.3.3 20031129 (prerelease) at -O -fno-force-mem.
Investigating.
-O alone is sufficient to trigger the ICE since -fforce-mem is not enabled at -O.
Patch here: <http://gcc.gnu.org/ml/gcc-patches/2003-12/msg00628.html>.
Subject: Bug 13060 CVSROOT: /cvs/gcc Module name: gcc Changes by: ebotcazou@gcc.gnu.org 2003-12-07 12:51:58 Modified files: gcc : ChangeLog function.c gcc/testsuite : ChangeLog Added files: gcc/testsuite/g77.f-torture/compile: 13060.f Log message: PR optimization/13060 * function.c (fixup_var_refs_1) [SUBREG]: Recognize even if a replacement already exists. Fix again the whole insn if that fails. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.1943&r2=2.1944 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/function.c.diff?cvsroot=gcc&r1=1.473&r2=1.474 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.3235&r2=1.3236 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g77.f-torture/compile/13060.f.diff?cvsroot=gcc&r1=NONE&r2=1.1
Subject: Bug 13060 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-3_3-branch Changes by: ebotcazou@gcc.gnu.org 2003-12-11 07:58:00 Modified files: gcc : ChangeLog function.c gcc/testsuite : ChangeLog Added files: gcc/testsuite/g77.f-torture/compile: 13060.f Log message: Backport from mainline: 2003-12-07 Eric Botcazou <ebotcazou@libertysurf.fr> PR optimization/13060 * function.c (fixup_var_refs_1) [SUBREG]: Recognize even if a replacement already exists. Fix again the whole insn if that fails. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.16114.2.837&r2=1.16114.2.838 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/function.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.389.2.12&r2=1.389.2.13 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.2261.2.329&r2=1.2261.2.330 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g77.f-torture/compile/13060.f.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=NONE&r2=1.1.2.1
See the aforementioned link.