blob: e95563cd4060bfe6fa5a473518508e6e60371767 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
! Ensure that dummy arrays are transferred to the accelerator
! via an implicit pcopy.
! { dg-do run }
program main
integer, parameter :: n = 1000
integer :: a(n)
integer :: i
a(:) = -1
call dummy_array (a, n)
do i = 1, n
if (a(i) .ne. i) call abort
end do
end program main
subroutine dummy_array (a, n)
integer a(n)
!$acc parallel loop num_gangs (100) gang
do i = 1, n
a(i) = i
end do
!$acc end parallel loop
end subroutine
|