1 /* { dg-do compile } */ 2 /* { dg-options "-fopenmp" } */ 3 4 int i; 5 6 #pragma omp declare simd linear (val (x) : 1) linear (y : 2) 7 int bar (int x, int y, int z); 8 9 void foo(int x,int y)10foo (int x, int y) 11 { 12 #pragma omp simd linear (i: 3) 13 for (i = 0; i < 33; i += 3) 14 ; 15 #pragma omp simd linear (val (i): 3) /* { dg-error "modifier should not be specified in" } */ 16 for (i = 0; i < 33; i += 3) 17 ; 18 #pragma omp simd linear (x: y + 1) 19 for (i = 0; i < 10; i++) 20 x += y + 1; 21 #pragma omp simd linear (val (x): y + 1) /* { dg-error "modifier should not be specified in" } */ 22 for (i = 0; i < 10; i++) 23 x += y + 1; 24 #pragma omp for linear (x: y + 1) 25 for (i = 0; i < 10; i++) 26 x += y + 1; 27 #pragma omp for linear (val (x): y + 1) /* { dg-error "modifier should not be specified in" } */ 28 for (i = 0; i < 10; i++) 29 x += y + 1; 30 #pragma omp for simd linear (i: 3) 31 for (i = 0; i < 33; i += 3) 32 ; 33 #pragma omp for simd linear (val (i): 3) /* { dg-error "modifier should not be specified in" } */ 34 for (i = 0; i < 33; i += 3) 35 ; 36 #pragma omp for simd linear (x: y + 1) 37 for (i = 0; i < 10; i++) 38 x += y + 1; 39 #pragma omp for simd linear (val (x): y + 1) /* { dg-error "modifier should not be specified in" } */ 40 for (i = 0; i < 10; i++) 41 x += y + 1; 42 } 43