This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/50121] New: Labels in a TYPE statement should be put in the derived type's scope


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]