[C++ PATCH] Deprecate -ffriend-injection
[official-gcc.git] / gcc / testsuite / gfortran.dg / entry_18.f90
blobb9cc41740a62c91c4d50dba8677b6d757d009069
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.
7 ! Contributed by Arjen Markus <arjen.markus@wldelft.nl>
9 module gsub
10 contains
11 recursive 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
20 entry glocala( x, y )
21 y = x
22 end subroutine
23 subroutine 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
32 entry glocalb( x, y )
33 y = x
34 end subroutine
35 end module