1 /* PR middle-end/66199 */
4 int u
[1024], v
[1024], w
[1024];
6 __attribute__((noinline
, noclone
)) long
10 #pragma omp teams distribute simd default(none) firstprivate (a, b) shared(u, v, w)
11 for (d
= a
; d
< b
; d
++)
16 __attribute__((noinline
, noclone
)) long
17 f2 (long a
, long b
, long c
)
20 #pragma omp teams distribute simd default(none) firstprivate (a, b, c) shared(u, v, w) linear(d) lastprivate(e)
21 for (d
= a
; d
< b
; d
++)
29 __attribute__((noinline
, noclone
)) long
30 f3 (long a1
, long b1
, long a2
, long b2
)
33 #pragma omp teams distribute simd default(none) firstprivate (a1, b1, a2, b2) shared(u, v, w) lastprivate(d1, d2) collapse(2)
34 for (d1
= a1
; d1
< b1
; d1
++)
35 for (d2
= a2
; d2
< b2
; d2
++)
36 u
[d1
* 32 + d2
] = v
[d1
* 32 + d2
] + w
[d1
* 32 + d2
];
40 __attribute__((noinline
, noclone
)) long
41 f4 (long a1
, long b1
, long a2
, long b2
)
44 #pragma omp teams distribute simd default(none) firstprivate (a1, b1, a2, b2) shared(u, v, w) collapse(2)
45 for (d1
= a1
; d1
< b1
; d1
++)
46 for (d2
= a2
; d2
< b2
; d2
++)
47 u
[d1
* 32 + d2
] = v
[d1
* 32 + d2
] + w
[d1
* 32 + d2
];
54 if (f1 (0, 1024) != 1024
55 || f2 (0, 1024, 17) != 1024 + (17 + 5 * 1023)
56 || f3 (0, 32, 0, 32) != 64
57 || f4 (0, 32, 0, 32) != 64)