12c84541aSAlexey Bataev // RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 %s 22c84541aSAlexey Bataev 3a8a9153aSAlexey Bataev // RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 %s 4a8a9153aSAlexey Bataev 5*eaa341fbSSaiyedul Islam // RUN: %clang_cc1 -verify -fopenmp %s 6*eaa341fbSSaiyedul Islam // RUN: %clang_cc1 -verify -fopenmp-simd %s 7*eaa341fbSSaiyedul Islam foo(int x,int n)82c84541aSAlexey Bataevvoid foo(int x, int n) { 92c84541aSAlexey Bataev double vec[n]; 102c84541aSAlexey Bataev for (int iter = 0; iter < x; iter++) { 112c84541aSAlexey Bataev #pragma omp target teams distribute parallel for map( \ 122c84541aSAlexey Bataev from \ 1341ebe0ceSAlexey Bataev : vec [0:n]) default(none) // expected-note 4 {{explicit data sharing attribute requested here}} 142c84541aSAlexey Bataev // expected-error@+1 {{variable 'n' must have explicitly specified data sharing attributes}} 152c84541aSAlexey Bataev for (int ii = 0; ii < n; ii++) { 162c84541aSAlexey Bataev // expected-error@+3 {{variable 'iter' must have explicitly specified data sharing attributes}} 172c84541aSAlexey Bataev // expected-error@+2 {{variable 'vec' must have explicitly specified data sharing attributes}} 182c84541aSAlexey Bataev // expected-error@+1 {{variable 'x' must have explicitly specified data sharing attributes}} 192c84541aSAlexey Bataev vec[ii] = iter + ii + x; 202c84541aSAlexey Bataev } 212c84541aSAlexey Bataev } 222c84541aSAlexey Bataev } 23