2014-07-12 Paul Thomas <pault@gcc.gnu.org>
[official-gcc.git] / gcc / testsuite / gfortran.dg / recursive_check_1.f
blob7c292af085989748a6db8bcc0067b30c32a8684b
1 ! { dg-do compile }
2 ! PR fortran/26551
3 SUBROUTINE SUB()
4 CALL SUB() ! { dg-error "is not RECURSIVE" }
5 END SUBROUTINE
7 FUNCTION FUNC() RESULT (FOO)
8 INTEGER FOO
9 FOO = FUNC() ! { dg-error "is not RECURSIVE" }
10 END FUNCTION
12 SUBROUTINE SUB2()
13 ENTRY ENT2()
14 CALL ENT2() ! { dg-error "is not RECURSIVE" }
15 END SUBROUTINE
17 function func2()
18 integer func2
19 func2 = 42
20 return
21 entry c() result (foo)
22 foo = b() ! { dg-error "is not RECURSIVE" }
23 return
24 entry b() result (bar)
25 bar = 12
26 return
27 end function