diff options
Diffstat (limited to 'test/OpenMP/sections_lastprivate_messages.cpp')
-rw-r--r-- | test/OpenMP/sections_lastprivate_messages.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/test/OpenMP/sections_lastprivate_messages.cpp b/test/OpenMP/sections_lastprivate_messages.cpp index 870dd15..5f6b420 100644 --- a/test/OpenMP/sections_lastprivate_messages.cpp +++ b/test/OpenMP/sections_lastprivate_messages.cpp @@ -66,7 +66,7 @@ int foomain(int argc, char **argv) { I e(4); I g(5); int i; - int &j = i; // expected-note {{'j' defined here}} + int &j = i; #pragma omp parallel #pragma omp sections lastprivate // expected-error {{expected '(' after 'lastprivate'}} { @@ -144,7 +144,7 @@ int foomain(int argc, char **argv) { } #pragma omp parallel shared(i) #pragma omp parallel private(i) -#pragma omp sections lastprivate(j) // expected-error {{arguments of OpenMP clause 'lastprivate' cannot be of reference type}} +#pragma omp sections lastprivate(j) { foo(); } @@ -172,7 +172,7 @@ int main(int argc, char **argv) { S3 m; S6 n(2); int i; - int &j = i; // expected-note {{'j' defined here}} + int &j = i; #pragma omp parallel #pragma omp sections lastprivate // expected-error {{expected '(' after 'lastprivate'}} { @@ -300,7 +300,7 @@ int main(int argc, char **argv) { foo(); } #pragma omp parallel -#pragma omp sections lastprivate(j) // expected-error {{arguments of OpenMP clause 'lastprivate' cannot be of reference type}} +#pragma omp sections lastprivate(j) { foo(); } @@ -314,5 +314,10 @@ int main(int argc, char **argv) { { foo(); } + static int r; +#pragma omp sections lastprivate(r) // OK + { + foo(); + } return foomain<S4, S5>(argc, argv); // expected-note {{in instantiation of function template specialization 'foomain<S4, S5>' requested here}} } |