C99 testsuite readiness: Compile more tests with -std=gnu89
[official-gcc.git] / gcc / testsuite / g++.dg / gomp / pr67523.C
blobfb12c8c4695d6d46fbb085247f0de7b2b896be7f
1 // PR c++/67523
2 // { dg-do compile }
3 // { dg-options "-fopenmp" }
5 struct S { int s; };
7 template <typename T>
8 void foo (T &x, T &y)
10 #pragma omp for simd
11   for (T i = x; i < y; i++)     // { dg-error "used with class iteration variable" }
12     ;
13 #pragma omp parallel for simd
14   for (T i = x; i < y; i++)     // { dg-error "used with class iteration variable" }
15     ;
16 #pragma omp target teams distribute parallel for simd
17   for (T i = x; i < y; i++)     // { dg-error "used with class iteration variable" }
18     ;
19 #pragma omp target teams distribute simd
20   for (T i = x; i < y; i++)     // { dg-error "used with class iteration variable" }
21     ;
24 void
25 bar ()
27   S x, y;
28   foo <S> (x, y);