aboutsummaryrefslogtreecommitdiff
path: root/test/OpenMP/distribute_parallel_for_lastprivate_messages.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/OpenMP/distribute_parallel_for_lastprivate_messages.cpp')
-rw-r--r--test/OpenMP/distribute_parallel_for_lastprivate_messages.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/test/OpenMP/distribute_parallel_for_lastprivate_messages.cpp b/test/OpenMP/distribute_parallel_for_lastprivate_messages.cpp
index 745007fc48a8..b38d978cca03 100644
--- a/test/OpenMP/distribute_parallel_for_lastprivate_messages.cpp
+++ b/test/OpenMP/distribute_parallel_for_lastprivate_messages.cpp
@@ -18,14 +18,14 @@ public:
const S2 &operator =(const S2&) const;
S2 &operator =(const S2&);
static float S2s; // expected-note {{static data member is predetermined as shared}}
- static const float S2sc;
+ static const float S2sc; // expected-note {{static data member is predetermined as shared}}
};
-const float S2::S2sc = 0; // expected-note {{static data member is predetermined as shared}}
+const float S2::S2sc = 0;
const S2 b;
const S2 ba[5];
class S3 {
int a;
- S3 &operator=(const S3 &s3); // expected-note 2 {{implicitly declared private here}}
+ S3 &operator=(const S3 &s3); // expected-note {{implicitly declared private here}}
public:
S3() : a(0) {}
@@ -52,7 +52,7 @@ public:
};
class S6 {
int a;
- S6() : a(0) {}
+ S6() : a(0) {} // expected-note {{implicitly declared private here}}
public:
S6(const S6 &s6) : a(s6.a) {}
@@ -313,14 +313,16 @@ int main(int argc, char **argv) {
#pragma omp distribute parallel for lastprivate(j)
for (i = 0; i < argc; ++i)
foo();
+// expected-error@+3 {{firstprivate variable cannot be lastprivate}} expected-note@+3 {{defined as firstprivate}}
#pragma omp target
#pragma omp teams
-#pragma omp distribute parallel for firstprivate(m) lastprivate(m) // expected-error {{'operator=' is a private member of 'S3'}}
+#pragma omp distribute parallel for firstprivate(m) lastprivate(m)
for (i = 0; i < argc; ++i)
foo();
+// expected-error@+3 {{lastprivate variable cannot be firstprivate}} expected-note@+3 {{defined as lastprivate}}
#pragma omp target
#pragma omp teams
-#pragma omp distribute parallel for lastprivate(n) firstprivate(n) // OK
+#pragma omp distribute parallel for lastprivate(n) firstprivate(n) // expected-error {{calling a private constructor of class 'S6'}}
for (i = 0; i < argc; ++i)
foo();
static int si;