1 ! Ensure that a non-scalar dummy arguments which are implicitly used inside
2 ! offloaded regions are properly mapped using present_or_copy, or (default)
10 integer,parameter :: size
= 100
11 integer :: array(size
), i
, n
15 !$acc data copy(array)
17 call kernels(array
, n
)
19 !$acc update host(array)
22 if (array(i
) .ne
. i
) STOP 1
25 call kernels_default_present(array
, n
)
27 !$acc update host(array)
30 if (array(i
) .ne
. i
+1) STOP 2
33 call parallel(array
, n
)
35 !$acc update host(array)
38 if (array(i
) .ne
. i
+i
) STOP 3
41 call parallel_default_present(array
, n
)
46 if (array(i
) .ne
. i
+i
+1) STOP 4
50 subroutine kernels (array
, n
)
51 integer, dimension (n
) :: array
59 end subroutine kernels
61 subroutine kernels_default_present (array
, n
)
62 integer, dimension (n
) :: array
65 !$acc kernels default(present)
70 end subroutine kernels_default_present
72 subroutine parallel (array
, n
)
73 integer, dimension (n
) :: array
81 end subroutine parallel
83 subroutine parallel_default_present (array
, n
)
84 integer, dimension (n
) :: array
87 !$acc parallel default(present)
92 end subroutine parallel_default_present