summaryrefslogtreecommitdiffstats
path: root/test/OpenMP/parallel_for_lastprivate_messages.cpp
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2015-12-10 08:20:58 +0000
committerAlexey Bataev <a.bataev@hotmail.com>2015-12-10 08:20:58 +0000
commitd1146925d8e139d4b2b108619ff21e4d1fc5ff62 (patch)
tree4191acbc862ac2bcaa8d51469b23a59a51a11dc9 /test/OpenMP/parallel_for_lastprivate_messages.cpp
parentba08f692f9129d377354448a1c58c9088fb29775 (diff)
[OPENMP] Fixed processing of predetermined data-sharing attributes
Predetermined data-shared attributes for local variables are now considered as implicit. Also, patch prohibits changin of DSA for static memebers of classes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@255229 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/OpenMP/parallel_for_lastprivate_messages.cpp')
-rw-r--r--test/OpenMP/parallel_for_lastprivate_messages.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/OpenMP/parallel_for_lastprivate_messages.cpp b/test/OpenMP/parallel_for_lastprivate_messages.cpp
index 6eb60b32b8..ccfe2ea407 100644
--- a/test/OpenMP/parallel_for_lastprivate_messages.cpp
+++ b/test/OpenMP/parallel_for_lastprivate_messages.cpp
@@ -17,7 +17,7 @@ public:
S2(S2 &s2) : a(s2.a) {}
S2 &operator=(const S2 &);
const S2 &operator=(const S2 &) const;
- static float S2s;
+ static float S2s; // expected-note {{static data member is predetermined as shared}}
static const float S2sc;
};
const float S2::S2sc = 0; // expected-note {{static data member is predetermined as shared}}
@@ -188,7 +188,7 @@ int main(int argc, char **argv) {
#pragma omp parallel for lastprivate(xa) // OK
for (i = 0; i < argc; ++i)
foo();
-#pragma omp parallel for lastprivate(S2::S2s)
+#pragma omp parallel for lastprivate(S2::S2s) // expected-error {{shared variable cannot be lastprivate}}
for (i = 0; i < argc; ++i)
foo();
#pragma omp parallel for lastprivate(S2::S2sc) // expected-error {{shared variable cannot be lastprivate}}