1 // RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 %s 2 3 void foo(int x, int n) { 4 double vec[n]; 5 for (int iter = 0; iter < x; iter++) { 6 #pragma omp target teams distribute parallel for map( \ 7 from \ 8 : vec [0:n]) default(none) 9 // expected-error@+1 {{variable 'n' must have explicitly specified data sharing attributes}} 10 for (int ii = 0; ii < n; ii++) { 11 // expected-error@+3 {{variable 'iter' must have explicitly specified data sharing attributes}} 12 // expected-error@+2 {{variable 'vec' must have explicitly specified data sharing attributes}} 13 // expected-error@+1 {{variable 'x' must have explicitly specified data sharing attributes}} 14 vec[ii] = iter + ii + x; 15 } 16 } 17 } 18 19