summaryrefslogtreecommitdiffstats
path: root/clang/test/OpenMP/threadprivate_messages.cpp
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2016-01-13 11:18:54 +0000
committerAlexey Bataev <a.bataev@hotmail.com>2016-01-13 11:18:54 +0000
commitc4fad65bfc86c21926e444f2dfc2c9787fbc7551 (patch)
tree56b5ffaac9be1619fc276e4221e60d4fe18f56bf /clang/test/OpenMP/threadprivate_messages.cpp
parent529b940a77a8abf4e2ba99f5d1b4e821e0b8a696 (diff)
downloadbcm5719-llvm-c4fad65bfc86c21926e444f2dfc2c9787fbc7551.tar.gz
bcm5719-llvm-c4fad65bfc86c21926e444f2dfc2c9787fbc7551.zip
[OPENMP] Fix for declarative/standalone directives use.
Fixes processing of declarative directives and standalone executable directives. Declarative directives should not be allowed as an immediate statements and standalone executable directives are allowed to be used in case-stmt constructs. llvm-svn: 257586
Diffstat (limited to 'clang/test/OpenMP/threadprivate_messages.cpp')
-rw-r--r--clang/test/OpenMP/threadprivate_messages.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/test/OpenMP/threadprivate_messages.cpp b/clang/test/OpenMP/threadprivate_messages.cpp
index f71d58bc52a..8c442f47ad5 100644
--- a/clang/test/OpenMP/threadprivate_messages.cpp
+++ b/clang/test/OpenMP/threadprivate_messages.cpp
@@ -118,6 +118,7 @@ int main(int argc, char **argv) { // expected-note {{'argc' defined here}}
static double d1;
static double d2;
static double d3; // expected-note {{'d3' defined here}}
+ static double d4;
static TestClass LocalClass(y); // expected-error {{variable with local storage in initial value of threadprivate variable}}
#pragma omp threadprivate(LocalClass)
@@ -133,6 +134,8 @@ int main(int argc, char **argv) { // expected-note {{'argc' defined here}}
#pragma omp threadprivate(d3) // expected-error {{'#pragma omp threadprivate' must appear in the scope of the 'd3' variable declaration}}
}
#pragma omp threadprivate(d3)
+label:
+#pragma omp threadprivate(d4) // expected-error {{'#pragma omp threadprivate' cannot be an immediate substatement}}
#pragma omp threadprivate(a) // expected-error {{'#pragma omp threadprivate' must appear in the scope of the 'a' variable declaration}}
return (y);
OpenPOWER on IntegriCloud