Fix warning with -Wsign-compare -Wsystem-headers
[official-gcc.git] / libgomp / testsuite / libgomp.oacc-fortran / vector-routine.f90
blob1edcee48677e2b9633c2d7e2124d0def66d40a57
1 ! { dg-do run }
3 module param
4 integer, parameter :: N = 32
5 end module param
7 program main
8 use param
9 integer :: i
10 integer :: a(N)
12 do i = 1, N
13 a(i) = i
14 end do
16 !$acc parallel copy (a)
17 !$acc loop worker
18 do i = 1, N
19 call vector (a)
20 end do
21 !$acc end parallel
23 do i = 1, N
24 if (a(i) .ne. 0) call abort
25 end do
27 contains
29 subroutine vector (a)
30 !$acc routine vector
31 integer, intent (inout) :: a(N)
32 integer :: i
34 !$acc loop vector
35 do i = 1, N
36 a(i) = a(i) - a(i)
37 end do
39 end subroutine vector
41 end program main