summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/recursive_check_1.f
blob: 7c292af085989748a6db8bcc0067b30c32a8684b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
! { dg-do compile }
! PR fortran/26551
      SUBROUTINE SUB()
      CALL SUB() ! { dg-error "is not RECURSIVE" }
      END SUBROUTINE

      FUNCTION FUNC() RESULT (FOO)
      INTEGER FOO
      FOO = FUNC() ! { dg-error "is not RECURSIVE" }
      END FUNCTION

      SUBROUTINE SUB2()
      ENTRY ENT2()
      CALL ENT2() ! { dg-error "is not RECURSIVE" }
      END SUBROUTINE

      function func2()
      integer func2
      func2 = 42
      return
      entry c() result (foo)
      foo = b() ! { dg-error "is not RECURSIVE" }
      return
      entry b() result (bar)
      bar = 12
      return
      end function