aboutsummaryrefslogtreecommitdiff
path: root/test/OpenMP/sections_private_messages.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/OpenMP/sections_private_messages.cpp')
-rw-r--r--test/OpenMP/sections_private_messages.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/test/OpenMP/sections_private_messages.cpp b/test/OpenMP/sections_private_messages.cpp
index 7854b3d8bdd3..f13bbdb012e2 100644
--- a/test/OpenMP/sections_private_messages.cpp
+++ b/test/OpenMP/sections_private_messages.cpp
@@ -47,7 +47,7 @@ int foomain(I argc, C **argv) {
I e(4);
I g(5);
int i;
- int &j = i; // expected-note {{'j' defined here}}
+ int &j = i;
#pragma omp sections private // expected-error {{expected '(' after 'private'}}
{
foo();
@@ -112,7 +112,7 @@ int foomain(I argc, C **argv) {
}
#pragma omp parallel shared(i)
#pragma omp parallel private(i)
-#pragma omp sections private(j) // expected-error {{arguments of OpenMP clause 'private' cannot be of reference type}}
+#pragma omp sections private(j)
{
foo();
}
@@ -135,7 +135,7 @@ int main(int argc, char **argv) {
S4 e(4);
S5 g(5);
int i;
- int &j = i; // expected-note {{'j' defined here}}
+ int &j = i;
#pragma omp sections private // expected-error {{expected '(' after 'private'}}
{
foo();
@@ -198,7 +198,7 @@ int main(int argc, char **argv) {
}
#pragma omp parallel shared(i)
#pragma omp parallel private(i)
-#pragma omp sections private(j) // expected-error {{arguments of OpenMP clause 'private' cannot be of reference type}}
+#pragma omp sections private(j)
{
foo();
}
@@ -206,6 +206,11 @@ int main(int argc, char **argv) {
{
foo();
}
+ static int m;
+#pragma omp sections private(m)
+ {
+ foo();
+ }
return 0;
}