summaryrefslogtreecommitdiffstats
path: root/test/OpenMP/parallel_for_firstprivate_messages.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/OpenMP/parallel_for_firstprivate_messages.cpp')
-rw-r--r--test/OpenMP/parallel_for_firstprivate_messages.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/test/OpenMP/parallel_for_firstprivate_messages.cpp b/test/OpenMP/parallel_for_firstprivate_messages.cpp
index b495873..2c762b4 100644
--- a/test/OpenMP/parallel_for_firstprivate_messages.cpp
+++ b/test/OpenMP/parallel_for_firstprivate_messages.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -verify -fopenmp=libiomp5 %s
+// RUN: %clang_cc1 -verify -fopenmp %s
void foo() {
}
@@ -137,6 +137,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;
const int da[5] = {0};
@@ -207,7 +215,7 @@ int main(int argc, char **argv) {
#pragma omp parallel for firstprivate(m) // OK
for (i = 0; i < argc; ++i)
foo();
-#pragma omp parallel for firstprivate(h) // expected-error {{threadprivate or thread local variable cannot be firstprivate}}
+#pragma omp parallel for firstprivate(h, B::x) // expected-error 2 {{threadprivate or thread local variable cannot be firstprivate}}
for (i = 0; i < argc; ++i)
foo();
#pragma omp parallel for private(xa), firstprivate(xa) // expected-error {{private variable cannot be firstprivate}} expected-note {{defined as private}}
OpenPOWER on IntegriCloud