5 __attribute__((noinline
, noclone
)) void
6 foo (int (*x
)[3][2], int *y
, long w
[1][2], int s
, int t
)
8 unsigned long long a
[9] = {};
11 #pragma omp parallel for reduction(+:x[-1:2][:][0:2], z[t + 2:4]) \
12 reduction(*:y[-s:3]) reduction(|:a[s + 3:4]) \
13 reduction(&:w[s + 1:1][t:2]) reduction(max:b[2:])
14 for (i
= 0; i
< 128; i
++)
16 x
[i
/ 64 - 1][i
% 3][(i
/ 4) & 1] += i
;
23 z
[i
/ 32 + 2] += (i
& 3);
26 a
[i
/ 32 + 2] |= 1ULL << (i
& 30);
27 w
[0][i
& 1] &= ~(1L << (i
/ 17 * 3));
35 for (i
= 0; i
< 9; i
++)
36 if (a
[i
] != ((i
< 6 && i
>= 2) ? 0x55555555ULL
: 0))
38 if (b
[0] != 0 || b
[1] != 0 || b
[2] != 22 || b
[3] != 84 || b
[4] != 127)
46 static int a2
[4][3][2] = {{{ 0, 0 }, { 0, 0 }, { 0, 0 }},
47 {{ 312, 381 }, { 295, 356 }, { 337, 335 }},
48 {{ 1041, 975 }, { 1016, 1085 }, { 935, 1060 }},
49 {{ 0, 0 }, { 0, 0 }, { 0, 0 }}};
50 int y
[5] = { 0, 1, 1, 1, 0 };
51 int y2
[5] = { 0, 6561, 2401, 289, 0 };
52 char z2
[10] = { 0, 0, 48, 49, 50, 51, 0, 0, 0, 0 };
53 long w
[1][2] = { ~0L, ~0L };
54 foo (&a
[2], y
, w
, -1, 0);
55 if (__builtin_memcmp (a
, a2
, sizeof (a
))
56 || __builtin_memcmp (y
, y2
, sizeof (y
))
57 || __builtin_memcmp (z
, z2
, sizeof (z
))
58 || w
[0][0] != ~0x249249L
59 || w
[0][1] != ~0x249249L
)