mirror of
https://github.com/autc04/Retro68.git
synced 2024-12-03 10:49:58 +00:00
28 lines
360 B
Fortran
28 lines
360 B
Fortran
! { dg-do run }
|
|
! { dg-options "-fno-inline" }
|
|
|
|
program main
|
|
integer :: n
|
|
|
|
n = 5
|
|
|
|
!$acc parallel copy (n)
|
|
n = func (n)
|
|
!$acc end parallel
|
|
|
|
if (n .ne. 6) call abort
|
|
|
|
contains
|
|
|
|
function func (n) result (rc)
|
|
!$acc routine
|
|
integer, intent (in) :: n
|
|
integer :: rc
|
|
|
|
rc = n
|
|
rc = rc + 1
|
|
|
|
end function
|
|
|
|
end program
|