1 extern void abort (void);
6 int a
= 1, b
= 2, c
= 4, d
[7];
13 #pragma omp target enter data nowait map (to: a, b, c) depend(out: d[0])
14 #pragma omp target nowait map (alloc: a, b) depend(in: d[0]) depend(out: d[1])
16 #pragma omp atomic update
18 #pragma omp atomic update
21 #pragma omp target nowait map (alloc: a, c) depend(in: d[0]) depend(out: d[2])
23 #pragma omp atomic update
25 #pragma omp atomic update
28 #pragma omp target exit data nowait map (from: a, b, c) depend(in: d[1], d[2])
30 if (a
!= 21 || b
!= 10 || c
!= 36)
32 #pragma omp target map (tofrom: a, b) nowait
37 #pragma omp target map (tofrom: c) nowait
41 } /* Implicit barrier here. */
44 if (a
!= 5 || b
!= 8 || c
!= 44)
46 #pragma omp target map (tofrom: a, b) nowait
51 #pragma omp target map (tofrom: c) nowait
54 if (a
!= 37 || b
!= 12 || c
!= 40)
56 #pragma omp target nowait map (tofrom: a, b) depend(out: d[3])
58 #pragma omp atomic update
62 #pragma omp target nowait map (tofrom: a, c) depend(out: d[4])
64 #pragma omp atomic update
68 #pragma omp task if (0) depend (in: d[3], d[4]) shared (a, b, c)
69 if (a
!= 50 || b
!= 4 || c
!= 20)
71 #pragma omp task shared (a)
73 #pragma omp target nowait map (tofrom: b)
75 #pragma omp target map (tofrom: c) nowait
78 if (a
!= 100 || b
!= 5 || c
!= 19)
80 #pragma omp target map (tofrom: a) nowait depend(out: d[5])
82 #pragma omp target map (tofrom: b) nowait depend(out: d[6])
84 #pragma omp target map (tofrom: a, b) depend(in: d[5], d[6])
86 if (a
!= 101 || b
!= 6)
94 if (a
!= 24 || b
!= 38)
96 } /* Implicit barrier here. */
99 #pragma omp target nowait map (tofrom: a, b)
104 #pragma omp target map (tofrom: c) nowait
108 if (a
!= 48 || b
!= 39 || c
!= 18)