1! { dg-do run } 2! { dg-options "-fno-inline" } 3 4 interface 5 recursive function fact (x) 6 !$acc routine 7 integer, intent(in) :: x 8 integer :: fact 9 end function fact 10 end interface 11 integer, parameter :: n = 10 12 integer :: a(n), i 13 !$acc parallel 14 !$acc loop 15 do i = 1, n 16 a(i) = fact (i) 17 end do 18 !$acc end parallel 19 do i = 1, n 20 if (a(i) .ne. fact(i)) STOP 1 21 end do 22end 23recursive function fact (x) result (res) 24 !$acc routine 25 integer, intent(in) :: x 26 integer :: res 27 if (x < 1) then 28 res = 1 29 else 30 res = x * fact (x - 1) 31 end if 32end function fact 33