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