OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [recursive_check_11.f90] - Blame information for rev 694

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
! { dg-options "-fcheck=recursion" }
3
! { dg-shouldfail "Recursion check" }
4
!
5
! { dg-output "Fortran runtime error: Recursive call to nonrecursive procedure 'f'" }
6
!
7
! PR fortran/39577
8
!
9
! wrong - recursion
10
program test
11
 integer :: i
12
 i = f(.false.)
13
 print *,i
14
 i = f(.true.)
15
 print *,i
16
contains
17
  integer function f(rec)
18
    logical :: rec
19
    if(rec) then
20
      f = g()
21
    else
22
      f = 42
23
    end if
24
  end function f
25
  integer function g()
26
    g = f(.false.)
27
  end function g
28
end program test

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.