PR c++/86342 - -Wdeprecated-copy and system headers.
[official-gcc.git] / libgomp / testsuite / libgomp.oacc-fortran / dummy-array.f90
blobe95563cd4060bfe6fa5a473518508e6e60371767
1 ! Ensure that dummy arrays are transferred to the accelerator
2 ! via an implicit pcopy.
4 ! { dg-do run }
6 program main
7 integer, parameter :: n = 1000
8 integer :: a(n)
9 integer :: i
11 a(:) = -1
13 call dummy_array (a, n)
15 do i = 1, n
16 if (a(i) .ne. i) call abort
17 end do
18 end program main
20 subroutine dummy_array (a, n)
21 integer a(n)
23 !$acc parallel loop num_gangs (100) gang
24 do i = 1, n
25 a(i) = i
26 end do
27 !$acc end parallel loop
28 end subroutine