2 /* { dg-options "-O2" } */
3 /* { dg-additional-options "-msse2" { target sse2_runtime } } */
4 /* { dg-additional-options "-mavx" { target avx_runtime } } */
7 int a
[32][32] __attribute__((aligned (32))) = { { 1 } };
9 #pragma omp declare reduction (+:struct S:omp_out.s += omp_in.s)
10 #pragma omp declare reduction (foo:struct S:omp_out.s += omp_in.s)
11 #pragma omp declare reduction (foo:int:omp_out += omp_in)
13 __attribute__((noinline
, noclone
)) int
19 #pragma omp simd aligned(a : 32) lastprivate (i, j) reduction(+:s) reduction(foo:t, u) collapse(2)
20 for (i
= 0; i
< 32; i
++)
21 for (j
= 0; j
< 32; j
++)
30 if (t
.s
!= s
.s
|| u
!= s
.s
|| i
!= 32 || j
!= 32)
35 __attribute__((noinline
, noclone
)) int
41 #pragma omp simd aligned(a:32)reduction(+:s)reduction(foo:t,u)collapse(2)
42 for (i
= 0; i
< 32; i
++)
43 for (j
= 0; j
< 32; j
++)
52 if (t
.s
!= s
.s
|| u
!= s
.s
|| i
!= 32 || j
!= 32)
61 for (i
= 0; i
< 32; i
++)
62 for (j
= 0; j
< 32; j
++)
63 a
[i
][j
] = j
+ (i
/ 4);