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

Reply via email to