2 // { dg-options "-O2" }
3 // { dg-additional-options "-msse2" { target sse2_runtime } }
4 // { dg-additional-options "-mavx" { target avx_runtime } }
6 extern "C" void abort ();
7 int a[1024] __attribute__((aligned (32))) = { 1 };
15 #pragma omp declare reduction (+:S:omp_out.s += omp_in.s) \
16 initializer (omp_priv (0))
17 #pragma omp declare reduction (foo:S:omp_out.s += omp_in.s) \
18 initializer (omp_priv (0))
19 #pragma omp declare reduction (foo:int:omp_out += omp_in) \
20 initializer (omp_priv = 0)
22 __attribute__((noinline, noclone)) S
27 #pragma omp simd aligned(a : 32) reduction(+:s) reduction(foo:t, u) \
29 for (i = 0; i < 1024; i++)
36 if (t.s != s.s || u != s.s)
41 __attribute__((noinline, noclone)) int
45 #pragma omp simd aligned(a : 32) reduction(+:s) reduction(foo:t, u) \
47 for (i = 0; i < 1024; i++)
54 if (t.s != s.s || u != s.s)
63 for (i = 0; i < 1024; i++)
64 a[i] = (i & 31) + (i / 128);