1! { dg-do compile }
2! Test fix for PR37583, in which:
3! (i) the reference to glocal prior to the ENTRY caused an internal
4! error and
5! (ii) the need for a RECURSIVE attribute was ignored.
6!
7! Contributed by Arjen Markus <arjen.markus@wldelft.nl>
8!
9module gsub
10contains
11recursive subroutine suba( g )   ! prefix with "RECURSIVE"
12   interface
13       real function g(x)
14       real x
15       end function
16   end interface
17   real :: x, y
18   call mysub( glocala )
19   return
20entry glocala( x, y )
21   y = x
22end subroutine
23subroutine subb( g )
24   interface
25       real function g(x)
26       real x
27       end function
28   end interface
29   real :: x, y
30   call mysub( glocalb ) ! { dg-warning "Non-RECURSIVE" }
31   return
32entry glocalb( x, y )
33   y = x
34end subroutine
35end module
36