1 /* { dg-do run } */ 2 /* { dg-additional-options "-msse2" { target sse2_runtime } } */ 3 /* { dg-additional-options "-mavx" { target avx_runtime } } */ 4 5 int main()6main () 7 { 8 int k = 0, i, s = 0; 9 #pragma omp parallel 10 #pragma omp for simd linear(k : 3) reduction(+: s) schedule (static, 16) 11 for (i = 0; i < 128; i++) 12 { 13 k = k + 3; 14 s = s + k; 15 } 16 if (s != 128 * 129 / 2 * 3) __builtin_abort (); 17 return 0; 18 } 19