https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126909

--- Comment #2 from Steve Kargl <kargl at gcc dot gnu.org> ---
This seems to be an issue with any program unit that
can have an internal subprogram.

subroutine lost
   print *, "Entered lost"
   call sub()
   goto 10
   print *, 'More Dead code'
   contains
      subroutine sub()
      end subroutine sub
10 end subroutine lost

% gfcx -c t2.f90
t2.f90:28:10:

   28 |    goto 10
      |          1
Error: Label 10 referenced at (1) is never defined
% flang21 -c t2.f90

flang21 compiles the code.

Reply via email to