Skip gnat.dg/prot7.adb on hppa.
[official-gcc.git] / libgomp / testsuite / libgomp.oacc-fortran / combined-directives-1.f90
blobb980bc98a7f731ee4504e8530a6c11cf7fad52a7
1 ! This test exercises combined directives.
3 ! { dg-do run }
5 program main
6 integer, parameter :: n = 32
7 real :: a(n), b(n);
8 integer :: i
10 do i = 1, n
11 a(i) = 1.0
12 b(i) = 0.0
13 end do
15 !$acc parallel loop copy (a(1:n)) copy (b(1:n))
16 do i = 1, n
17 b(i) = 2.0
18 a(i) = a(i) + b(i)
19 end do
21 do i = 1, n
22 if (a(i) .ne. 3.0) STOP 1
24 if (b(i) .ne. 2.0) STOP 2
25 end do
27 !$acc kernels loop copy (a(1:n)) copy (b(1:n))
28 do i = 1, n
29 b(i) = 3.0;
30 a(i) = a(i) + b(i)
31 end do
33 do i = 1, n
34 if (a(i) .ne. 6.0) STOP 3
36 if (b(i) .ne. 3.0) STOP 4
37 end do
39 end program main