OSDN Git Service

2010-03-17 Tobias Burnus <burnus@net-b.de>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gfortran.dg / entry_18.f90
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 !
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
36 ! { dg-final { cleanup-modules "gsub" } }