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 };
7 int b[1024] __attribute__((aligned (32))) = { 1 };
9 struct U { U (); ~U (); int u; };
15 if (v > 38 + 4 + 3 * 1024 + 1)
18 V &operator= (const V &x) { v = x.v + 1; return *this; }
22 __attribute__((noinline, noclone))
27 __attribute__((noinline, noclone))
30 if (u > 38 + 4 + 3 * 1023)
34 __attribute__((noinline, noclone)) int
40 #pragma omp simd aligned(a, p : 32) linear(k: m + 1) \
41 reduction(+:s) lastprivate(u, v)
42 for (i = 0; i < 1024; i++)
50 if (u.u != 36 + 4 + 3 * 1023 || v.v != 36 + 4 + 3 * 1024 + 1)
58 #if __SIZEOF_INT__ >= 4
62 for (i = 0; i < 1024; i++)
68 for (i = 0; i < 1024; i++)
70 if (b[i] != (i - 51) % 39
71 || a[i] != (i - 512) * b[i])
74 if (k != 4 + 3 * 1024 || s != 1596127)