I have a few old programs that do this - it is legal in f77 and actually has a
special name that I cannot recall at the moment. Absoft likes and runs it 
correctly.

[dir:~/tests/gfortran] dir% f77 -o jump jump.f
FORTRAN 77 Compiler 8.0a, Copyright (c) 1987-2003, Absoft Corp.
[dir:~/tests/gfortran] dir% jump
 hi
 hi
[dir:~/tests/gfortran] dir% gfortran -o jump jump.f
 In file jump.f:4

  10  continue                                                          
   1
 In file jump.f:9

                    
                   2
Error: Label at (1) is not in the same block as the GOTO statement at (2)
[dir:~/tests/gfortran] dir% cat jump.f
      program main
      do 20 i=1,2
      go to 30
  10  continue
  20  continue
      stop
  30  continue
      write(*,*) 'hi'
      goto 10
      end

-- 
           Summary: gfortran - flags error on strange, but correct f77
                    program
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dir at lanl dot gov
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: powerpc-apple-darwin7.8.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20224

Reply via email to