1 /* PR middle-end/66199 */
4 #pragma omp declare target
5 int u
[1024], v
[1024], w
[1024];
6 #pragma omp end declare target
8 __attribute__((noinline
, noclone
)) long
9 f2 (long a
, long b
, long c
)
12 #pragma omp target map(from: d, e)
13 #pragma omp teams default(none) firstprivate (a, b, c) shared(d, e, u, v, w)
14 #pragma omp distribute lastprivate(d, e)
15 for (d
= a
; d
< b
; d
++)
23 __attribute__((noinline
, noclone
)) long
24 f3 (long a1
, long b1
, long a2
, long b2
)
27 #pragma omp target map(from: d1, d2)
28 #pragma omp teams default(none) shared(a1, b1, a2, b2, d1, d2, u, v, w)
29 #pragma omp distribute firstprivate (a1, b1, a2, b2) lastprivate(d1, d2) collapse(2)
30 for (d1
= a1
; d1
< b1
; d1
++)
31 for (d2
= a2
; d2
< b2
; d2
++)
32 u
[d1
* 32 + d2
] = v
[d1
* 32 + d2
] + w
[d1
* 32 + d2
];
39 if (f2 (0, 1024, 17) != 1024 + (17 + 5 * 1023)
40 || f3 (0, 32, 0, 32) != 64)