mirror of
https://github.com/autc04/Retro68.git
synced 2024-09-28 18:56:06 +00:00
26 lines
389 B
Fortran
26 lines
389 B
Fortran
! { dg-do run }
|
|
! { dg-options "-fcheck=recursion" }
|
|
!
|
|
! PR fortran/39577
|
|
!
|
|
! OK - no recursion
|
|
program test
|
|
integer :: i
|
|
i = f(.false.)
|
|
print *,i
|
|
i = f(.false.)
|
|
print *,i
|
|
contains
|
|
integer function f(rec)
|
|
logical :: rec
|
|
if(rec) then
|
|
f = g()
|
|
else
|
|
f = 42
|
|
end if
|
|
end function f
|
|
integer function g()
|
|
g = f(.false.)
|
|
end function g
|
|
end program test
|