ca9dc64220
2018-04-26 Tom de Vries <tom@codesourcery.com> PR target/85519 * testsuite/libgomp.fortran/examples-4/declare_target-1.f90: Reduce recursion depth from 25 to 23. * testsuite/libgomp.fortran/examples-4/declare_target-2.f90: Same. From-SVN: r259674
25 lines
495 B
Fortran
25 lines
495 B
Fortran
! { dg-do run }
|
|
|
|
program e_53_2
|
|
!$omp declare target (fib)
|
|
integer :: x, fib
|
|
!$omp target map(from: x)
|
|
! Reduced from 25 to 23, otherwise execution runs out of thread stack on
|
|
! Nvidia Titan V.
|
|
x = fib (23)
|
|
!$omp end target
|
|
if (x /= fib (23)) STOP 1
|
|
end program
|
|
|
|
integer recursive function fib (n) result (f)
|
|
!$omp declare target
|
|
integer :: n
|
|
if (n <= 0) then
|
|
f = 0
|
|
else if (n == 1) then
|
|
f = 1
|
|
else
|
|
f = fib (n - 1) + fib (n - 2)
|
|
end if
|
|
end function
|