mirror of
https://github.com/autc04/Retro68.git
synced 2024-12-11 19:49:32 +00:00
24 lines
392 B
Fortran
24 lines
392 B
Fortran
! { dg-do run }
|
|
! { dg-options "-fno-inline" }
|
|
|
|
integer, parameter :: n = 10
|
|
integer :: a(n), i
|
|
do i = 1, n
|
|
a(i) = i
|
|
end do
|
|
!$acc parallel
|
|
!$acc loop
|
|
do i = 1, n
|
|
call incr(a(i))
|
|
end do
|
|
!$acc end parallel
|
|
do i = 1, n
|
|
if (a(i) .ne. (i + 1)) STOP 1
|
|
end do
|
|
end
|
|
subroutine incr (x)
|
|
!$acc routine
|
|
integer, intent(inout) :: x
|
|
x = x + 1
|
|
end subroutine incr
|