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 for simd linear(k : 3) reduction(+: s) schedule (static, 16) 10 for (i = 0; i < 128; i++) 11 { 12 k = k + 3; 13 s = s + k; 14 } 15 if (s != 128 * 129 / 2 * 3) __builtin_abort (); 16 return 0; 17 } 18