1! { dg-do compile }
2!
3! PR 41781: [OOP] bogus undefined label error with SELECT TYPE.
4!
5! Contributed by Salvatore Filippone <sfilippone@uniroma2.it>
6! and Tobias Burnus >burnus@gcc.gnu.org>
7
8! 1st example: jumping out of SELECT TYPE (valid)
9type bar
10  integer :: i
11end type bar
12class(bar), pointer :: var
13select type(var)
14class default
15  goto 9999
16end select
179999 continue
18
19! 2nd example: jumping out of BLOCK (valid)
20block
21  goto 88
22end block
2388 continue
24
25! 3rd example: jumping into BLOCK (invalid)
26goto 99        ! { dg-warning "is not in the same block" }
27block
28  99 continue  ! { dg-warning "is not in the same block" }
29end block
30
31end
32