diff options
Diffstat (limited to 'test/OpenMP/parallel_sections_shared_messages.cpp')
-rw-r--r-- | test/OpenMP/parallel_sections_shared_messages.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/test/OpenMP/parallel_sections_shared_messages.cpp b/test/OpenMP/parallel_sections_shared_messages.cpp index d4915c8..2b83597 100644 --- a/test/OpenMP/parallel_sections_shared_messages.cpp +++ b/test/OpenMP/parallel_sections_shared_messages.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -verify -fopenmp=libiomp5 -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s void foo() { } @@ -48,6 +48,14 @@ public: S3 h; #pragma omp threadprivate(h) // expected-note {{defined as threadprivate or thread local}} +namespace A { +double x; +#pragma omp threadprivate(x) // expected-note {{defined as threadprivate or thread local}} +} +namespace B { +using A::x; +} + int main(int argc, char **argv) { const int d = 5; const int da[5] = {0}; @@ -83,7 +91,7 @@ int main(int argc, char **argv) { { foo(); } #pragma omp parallel sections shared(e, g) { foo(); } -#pragma omp parallel sections shared(h) // expected-error {{threadprivate or thread local variable cannot be shared}} +#pragma omp parallel sections shared(h, B::x) // expected-error 2 {{threadprivate or thread local variable cannot be shared}} { foo(); } #pragma omp parallel sections private(i), shared(i) // expected-error {{private variable cannot be shared}} expected-note {{defined as private}} { foo(); } |