------- Comment #3 from dfranke at gcc dot gnu dot org 2009-04-25 17:16 ------- Here's a testcase (doesn't "work" without the extra subroutine):
$> cat goto.for i = 1 DO CALL inc(i) IF (i == 5) GOTO 100 END DO 100 PRINT *, "done" END SUBROUTINE inc(n) INTEGER n n = n + 1 END SUBROUTINE $> gfortran-svn -Wall -W goto.for [no warning] $> gfortran-svn -Wall -W warning.for -fwhole-file goto.for:6.3: 100 PRINT *, "done" 1 goto.for:4.72: IF (i == 5) GOTO 100 2 Warning: Label at (1) is not in the same block as the GOTO statement at (2) If this case is related to the ICE, I don't know, however, I observed both together. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39896