2 // { dg-additional-options "-msse2" { target sse2_runtime } }
3 // { dg-additional-options "-mavx" { target avx_runtime } }
5 extern "C" void abort ();
6 int a[1024] __attribute__((aligned (32))) = { 1 };
14 #pragma omp declare reduction (+:S:omp_out.s += omp_in.s) \
15 initializer (omp_priv (0))
16 #pragma omp declare reduction (foo:S:omp_out.s += omp_in.s) \
17 initializer (omp_priv (0))
18 #pragma omp declare reduction (foo:int:omp_out += omp_in) \
19 initializer (omp_priv = 0)
21 __attribute__((noinline, noclone)) S
26 #pragma omp simd aligned(a : 32) reduction(+:s) reduction(foo:t, u) \
28 for (i = 0; i < 1024; i++)
35 if (t.s != s.s || u != s.s)
40 __attribute__((noinline, noclone)) int
44 #pragma omp simd aligned(a : 32) reduction(+:s) reduction(foo:t, u) \
46 for (i = 0; i < 1024; i++)
53 if (t.s != s.s || u != s.s)
62 for (i = 0; i < 1024; i++)
63 a[i] = (i & 31) + (i / 128);