The attached file elxxdl.f (actually, I'll attach it as soon as I find out how to attach a file here) produces the following output g77 -v -O3 -c elxxdl.f Reading specs from /sw_current/bin/../lib/gcc/powerpc-apple-darwin7.3.0/3.4.0/specs Configured with: ../gcc-3.4.0/configure --prefix=/sw --enable-languages=f77 --infodir=/share/info --libexecdir=/lib --disable-shared Thread model: posix gcc version 3.4.0 /sw_current/bin/../lib/gcc/powerpc-apple-darwin7.3.0/3.4.0/f771 elxxdl.f -fPIC -quiet -dumpbase elxxdl.f -auxbase elxxdl -O3 -version -o /var/tmp//ccTnLrxk.s GNU F77 version 3.4.0 (powerpc-apple-darwin7.3.0) compiled by GNU C version 3.4.0. GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 In file included from elxxdl.f:0: elxxdl.f:1: internal compiler error: in force_nonfallthru_and_redirect, at cfgrtl.c:1114 Please submit a full bug report, It compiles OK with -O2 and with -Os. It produces the same ICE when compiled with g77 -O -finline-functions -funswitch-loops or with any -Ox option plus -finline-functions -funswitch-loops (I found these in old reports on problems with force_nonfallthru_and_redirect) When compiled with g77 from gcc version 3.4 20031015 (experimental) it compiles OK with -O3, but produces the ICE with g77 -O -finline-functions -funswitch-loops
Created attachment 6362 [details] Example for g77 ICE This is a real-world example, just slightly stripped. It is a minimal example: When one of the ENTRY..GOTO 1 blocks is removed, it compiles OK.
Can not reporoduce with any of the compile options listed by submitter on i686/gnu/linux (FC1) using GNU Fortran (GCC) 3.5.0 20040506 (experimental) --bud davis
Fixed by the change to gfortran instead of g77 on the mainline, it produces better code for this case as it no longer produces the switch table which g77 did.
Does this RESOLVED and FIXED mean the bug will not be looked at for g77-3.4? As I was afraid, in g77-3.5 this bug is simply replaced by a different bug. For the same file, I get g77 -v -O3 -c elxxdl.f Reading specs from /usr/local_g77-3.5/bin/../lib/gcc/powerpc-apple-darwin7.3.0/3.5.0/specs Configured with: ../gcc/configure --enable-threads=posix --enable-languages=f77 Thread model: posix gcc version 3.5.0 20040429 (experimental) /usr/local_g77-3.5/bin/../libexec/gcc/powerpc-apple-darwin7.3.0/3.5.0/f771 elxxdl.f -fPIC -quiet -dumpbase elxxdl.f -auxbase elxxdl -O3 -version -o /var/tmp//cc9oFxi0.s GNU F77 version 3.5.0 20040429 (experimental) (powerpc-apple-darwin7.3.0) compiled by GNU C version 3.5.0 20040429 (experimental). GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 In file included from elxxdl.f:0: elxxdl.f:1: error: unrecognizable insn: (jump_insn:HI 175 138 176 0 (return) -1 (nil) (nil)) elxxdl.f:1: internal compiler error: in extract_insn, at recog.c:2074 Please submit a full bug report. Is gfortran replacing the g77 bugs by again another set of bugs? (Sorry for the sarcasm, but I had hoped for a more useful reaction on my bug report).
g77 is at this point dead (newer snapshots of 3.5 do not include it) and will not be updated. What Ben was saying was that gfortran, the only fortran compiler in current 3.5 snapshots, does compile this correctly. Would you mind trying a newer snapshot (gfortran was merged 2 weeks ago, or so)? Thanks.