diff options
Diffstat (limited to 'clang/test/OpenMP/parallel_for_simd_lastprivate_messages.cpp')
-rw-r--r-- | clang/test/OpenMP/parallel_for_simd_lastprivate_messages.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/clang/test/OpenMP/parallel_for_simd_lastprivate_messages.cpp b/clang/test/OpenMP/parallel_for_simd_lastprivate_messages.cpp index 9f85c12c1dd..64d6ccc7ad1 100644 --- a/clang/test/OpenMP/parallel_for_simd_lastprivate_messages.cpp +++ b/clang/test/OpenMP/parallel_for_simd_lastprivate_messages.cpp @@ -127,6 +127,14 @@ int foomain(int argc, char **argv) { return 0; } +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; // expected-note {{constant variable is predetermined as shared}} const int da[5] = {0}; // expected-note {{constant variable is predetermined as shared}} @@ -197,7 +205,7 @@ int main(int argc, char **argv) { #pragma omp parallel for simd lastprivate(m) // expected-error {{'operator=' is a private member of 'S3'}} for (i = 0; i < argc; ++i) foo(); -#pragma omp parallel for simd lastprivate(h) // expected-error {{threadprivate or thread local variable cannot be lastprivate}} +#pragma omp parallel for simd lastprivate(h, B::x) // expected-error 2 {{threadprivate or thread local variable cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); #pragma omp parallel for simd private(xa), lastprivate(xa) // expected-error {{private variable cannot be lastprivate}} expected-note {{defined as private}} |