Rebase.
[official-gcc.git] / libgomp / testsuite / libgomp.c / simd-13.c
blob7c817b793dbe01ffb5a28dc258dabdd3d16bf0d1
1 /* { dg-do run } */
2 /* { dg-options "-O2" } */
3 /* { dg-additional-options "-msse2" { target sse2_runtime } } */
4 /* { dg-additional-options "-mavx" { target avx_runtime } } */
6 int
7 main ()
9 int k = 0, i, s = 0;
10 #pragma omp parallel for simd linear(k : 3) reduction(+: s) schedule (static, 16)
11 for (i = 0; i < 128; i++)
13 k = k + 3;
14 s = s + k;
16 if (s != 128 * 129 / 2 * 3) __builtin_abort ();
17 return 0;