Debian Codegraph @

gcc/testsuite/g++.dg/gomp/linear-4.C

raw
1 // { dg-do compile }
2 // { dg-options "-fopenmp" }
3
4 int i;
5
6 void
7 foo (int &x, int &y)
8 {
9 #pragma omp simd linear (x: step (y + 1), ref) // { dg-error "modifier other than 'val' specified in 'linear' clause" }
10 for (i = 0; i < 10; i++)
11 x += y + 1;
12 #pragma omp simd linear (x: uval, step (y + 1)) // { dg-error "modifier other than 'val' specified in 'linear' clause" }
13 for (i = 0; i < 10; i++)
14 x += y + 1;
15 #pragma omp parallel for linear (x: ref, step (y + 1)) // { dg-error "modifier other than 'val' specified in 'linear' clause" }
16 for (i = 0; i < 10; i++)
17 x += y + 1;
18 #pragma omp parallel for linear (x: step (y + 1), uval) // { dg-error "modifier other than 'val' specified in 'linear' clause" }
19 for (i = 0; i < 10; i++)
20 x += y + 1;
21 #pragma omp parallel for simd linear (x: step (y + 1), ref) // { dg-error "modifier other than 'val' specified in 'linear' clause" }
22 for (i = 0; i < 10; i++)
23 x += y + 1;
24 #pragma omp parallel for simd linear (x: uval, step (y + 1)) // { dg-error "modifier other than 'val' specified in 'linear' clause" }
25 for (i = 0; i < 10; i++)
26 x += y + 1;
27 }