http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50121
Bug #: 50121 Summary: Labels in a TYPE statement should be put in the derived type's scope Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassig...@gcc.gnu.org ReportedBy: mik...@gcc.gnu.org Follow-up to PR 50071, reported by Tobias at: http://gcc.gnu.org/ml/fortran/2011-08/msg00109.html gfortran doesn't put labels declared in a derived type in their own scope. PR 50071 fixed all cases but the one where the label is in the first line of the derived type definition: 1 type t integer :: i end type t goto 1 1 print *, 'Hello' end This case is more difficult, as at the time we insert the label, we haven't parsed the TYPE statement yet, thus the derived type scope is not available yet.