Debian Codegraph @

gcc/testsuite/gfortran.dg/goacc/routine-2.f90

raw
1 ! { dg-do compile }
2
3 module m1
4 contains
5 recursive function mfact (x) result (res)
6 integer, intent(in) :: x
7 integer :: res
8 integer i
9 i = 0
10 !$acc routine ! { dg-error "Unexpected \\\!\\\$ACC ROUTINE" }
11 if (x < 1) then
12 res = 1
13 else
14 res = x * mfact (x - 1)
15 end if
16 end function mfact
17 end module m1