[Patch, fortran] PR fortran/50071 Duplicate statement labels from different scoping units rejected.
Tobias Burnus
burnus@net-b.de
Sun Aug 14 08:36:00 GMT 2011
Hi Mikael,
Mikael Morin wrote:
> this patch fixes PR 50071 where statement labels in a type definition where
> hooked to the parent scoping unit instead of the type scoping unit.
I think the following is valid and it is still rejected (it is accepted
by NAG 5.1 and ifort):
1 type t
integer :: i
end type t
goto 1
1 print *, 'Hello'
end
Related but separate issue: BLOCK also starts a new scoping unit, but
the following is rejected:
block
goto 1
print *, 'Hello'
1 continue
end block
1 continue
end
Also the following is rejected:
block
goto 1
print *, 'Hello'
1 end block
end
variant, which is rejected (note: Associate does not start a new scoping
unit, just a new block):
integer :: i
associate (j => i)
goto 1
print *, 'Hello'
1 end associate
end
Tobias
More information about the Fortran
mailing list