summaryrefslogtreecommitdiffstats
path: root/clang/test/OpenMP/parallel_for_simd_reduction_messages.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/OpenMP/parallel_for_simd_reduction_messages.cpp')
-rw-r--r--clang/test/OpenMP/parallel_for_simd_reduction_messages.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/clang/test/OpenMP/parallel_for_simd_reduction_messages.cpp b/clang/test/OpenMP/parallel_for_simd_reduction_messages.cpp
index c58d56cd0f6..f92a9cc42cc 100644
--- a/clang/test/OpenMP/parallel_for_simd_reduction_messages.cpp
+++ b/clang/test/OpenMP/parallel_for_simd_reduction_messages.cpp
@@ -177,6 +177,14 @@ T tmain(T argc) {
return T();
}
+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 2 {{'d' defined here}}
const int da[5] = {0}; // expected-note {{'da' defined here}}
@@ -258,7 +266,7 @@ int main(int argc, char **argv) {
#pragma omp parallel for simd reduction(& : e, g) // expected-error {{calling a private constructor of class 'S4'}} expected-error {{invalid operands to binary expression ('S4' and 'S4')}} expected-error {{calling a private constructor of class 'S5'}} expected-error {{invalid operands to binary expression ('S5' and 'S5')}}
for (int i = 0; i < 10; ++i)
foo();
-#pragma omp parallel for simd reduction(+ : h, k) // expected-error {{threadprivate or thread local variable cannot be reduction}}
+#pragma omp parallel for simd reduction(+ : h, k, B::x) // expected-error 2 {{threadprivate or thread local variable cannot be reduction}}
for (int i = 0; i < 10; ++i)
foo();
#pragma omp parallel for simd reduction(+ : o) // expected-error {{no viable overloaded '='}}
OpenPOWER on IntegriCloud