This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/50121] New: Labels in a TYPE statement should be put in the derived type's scope
- From: "mikael at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 18 Aug 2011 23:04:54 +0000
- Subject: [Bug fortran/50121] New: Labels in a TYPE statement should be put in the derived type's scope
- Auto-submitted: auto-generated
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: unassigned@gcc.gnu.org
ReportedBy: mikael@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.