summaryrefslogtreecommitdiffstats
path: root/clang/test/OpenMP/target_teams_distribute_loop_messages.cpp
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2017-12-01 17:40:15 +0000
committerAlexey Bataev <a.bataev@hotmail.com>2017-12-01 17:40:15 +0000
commitb358f9922a65a9f64b834754a95a50fcb1fb068a (patch)
treeb314082b31f56f4292e9421c0f1dc8ce40e0fd09 /clang/test/OpenMP/target_teams_distribute_loop_messages.cpp
parent8d5e469c3299b32aa1f0759b0af44694aab88591 (diff)
downloadbcm5719-llvm-b358f9922a65a9f64b834754a95a50fcb1fb068a.tar.gz
bcm5719-llvm-b358f9922a65a9f64b834754a95a50fcb1fb068a.zip
[OPENMP] Do not allow variables to be first|last-privates in
distribute directives. OpenMP standard does not allow to mark the variables as firstprivate and lastprivate at the same time in distribute-based directives. Patch fixes this problem. llvm-svn: 319560
Diffstat (limited to 'clang/test/OpenMP/target_teams_distribute_loop_messages.cpp')
-rw-r--r--clang/test/OpenMP/target_teams_distribute_loop_messages.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/test/OpenMP/target_teams_distribute_loop_messages.cpp b/clang/test/OpenMP/target_teams_distribute_loop_messages.cpp
index 441abcba004..0a825ab1e60 100644
--- a/clang/test/OpenMP/target_teams_distribute_loop_messages.cpp
+++ b/clang/test/OpenMP/target_teams_distribute_loop_messages.cpp
@@ -2,7 +2,7 @@
class S {
int a;
- S() : a(0) {}
+ S() : a(0) {} // expected-note {{implicitly declared private here}}
public:
S(int v) : a(v) {}
@@ -607,7 +607,8 @@ void test_loop_eh() {
void test_loop_firstprivate_lastprivate() {
S s(4);
-#pragma omp target teams distribute lastprivate(s) firstprivate(s)
+// expected-error@+1 {{lastprivate variable cannot be firstprivate}} expected-note@+1 {{defined as lastprivate}}
+#pragma omp target teams distribute lastprivate(s) firstprivate(s) // expected-error {{calling a private constructor of class 'S'}}
for (int i = 0; i < 16; ++i)
;
}
OpenPOWER on IntegriCloud