Skip gnat.dg/prot7.adb on hppa.
[official-gcc.git] / libgomp / testsuite / libgomp.oacc-fortran / declare-3.f90
blobe1cb9435437f45f61bf1181f51b0367ca7d86c6a
1 ! { dg-do run }
2 ! { dg-skip-if "" { *-*-* } { "-DACC_MEM_SHARED=1" } }
4 module globalvars
5 implicit none
6 real b
7 !$acc declare link (b)
8 end module globalvars
10 program test
11 use openacc
12 use globalvars
13 implicit none
15 real a
16 real c
17 !$acc declare link (c)
19 if (acc_is_present (b) .neqv. .false.) STOP 1
20 if (acc_is_present (c) .neqv. .false.) STOP 2
22 a = 0.0
23 b = 1.0
25 !$acc parallel copy (a) copyin (b)
26 b = b + 4.0
27 a = b
28 !$acc end parallel
30 if (a .ne. 5.0) STOP 3
32 if (acc_is_present (b) .neqv. .false.) STOP 4
34 a = 0.0
36 !$acc parallel copy (a) create (b)
37 b = 4.0
38 a = b
39 !$acc end parallel
41 if (a .ne. 4.0) STOP 5
43 if (acc_is_present (b) .neqv. .false.) STOP 6
45 a = 0.0
47 !$acc parallel copy (a) copy (b)
48 b = 4.0
49 a = b
50 !$acc end parallel
52 if (a .ne. 4.0) STOP 7
53 if (b .ne. 4.0) STOP 8
55 if (acc_is_present (b) .neqv. .false.) STOP 9
57 a = 0.0
59 !$acc parallel copy (a) copy (b) copy (c)
60 b = 4.0
61 c = b
62 a = c
63 !$acc end parallel
65 if (a .ne. 4.0) STOP 10
67 if (acc_is_present (b) .neqv. .false.) STOP 11
69 end program test