gcc/
[official-gcc.git] / libgomp / testsuite / libgomp.c / simd-10.c
blob3352e504e119c1bda94e416b131309b770aa2536
1 /* { dg-do run } */
2 /* { dg-additional-options "-msse2" { target sse2_runtime } } */
3 /* { dg-additional-options "-mavx" { target avx_runtime } } */
5 int s = 0, i, u;
7 void
8 foo ()
10 #pragma omp for simd schedule(static, 32) reduction(+:s) lastprivate(u)
11 for (i = 0; i < 128; i++)
13 s++;
14 u = i;
16 if (i != 128 || s != 128 || u != 127)
17 __builtin_abort ();
20 int
21 main ()
23 foo ();
24 return 0;