diff options
Diffstat (limited to 'test/OpenMP/for_simd_linear_messages.cpp')
-rw-r--r-- | test/OpenMP/for_simd_linear_messages.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/test/OpenMP/for_simd_linear_messages.cpp b/test/OpenMP/for_simd_linear_messages.cpp index 9a935c3..189c8b0 100644 --- a/test/OpenMP/for_simd_linear_messages.cpp +++ b/test/OpenMP/for_simd_linear_messages.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -verify -fopenmp=libiomp5 %s +// RUN: %clang_cc1 -verify -fopenmp %s namespace X { int x; @@ -148,6 +148,14 @@ template<class I, class C> int foomain(I argc, C **argv) { return 0; } +namespace A { +double x; +#pragma omp threadprivate(x) // expected-note {{defined as threadprivate or thread local}} +} +namespace C { +using A::x; +} + int main(int argc, char **argv) { double darr[100]; // expected-note@+1 {{in instantiation of function template specialization 'test_template<-4, double, int>' requested here}} @@ -185,7 +193,7 @@ int main(int argc, char **argv) { // expected-error@+1 {{argument of a linear clause should be of integral or pointer type, not 'S5'}} #pragma omp for simd linear(e, g) for (int k = 0; k < argc; ++k) ++k; - #pragma omp for simd linear(h) // expected-error {{threadprivate or thread local variable cannot be linear}} + #pragma omp for simd linear(h, C::x) // expected-error 2 {{threadprivate or thread local variable cannot be linear}} for (int k = 0; k < argc; ++k) ++k; #pragma omp parallel { |