diff options
Diffstat (limited to 'test/OpenMP/parallel_sections_firstprivate_messages.cpp')
-rw-r--r-- | test/OpenMP/parallel_sections_firstprivate_messages.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/test/OpenMP/parallel_sections_firstprivate_messages.cpp b/test/OpenMP/parallel_sections_firstprivate_messages.cpp index 84d1859..b733aab 100644 --- a/test/OpenMP/parallel_sections_firstprivate_messages.cpp +++ b/test/OpenMP/parallel_sections_firstprivate_messages.cpp @@ -65,7 +65,7 @@ int foomain(int argc, char **argv) { I e(4); C g(5); int i; - int &j = i; // expected-note {{'j' defined here}} + int &j = i; #pragma omp parallel sections firstprivate // expected-error {{expected '(' after 'firstprivate'}} { foo(); @@ -130,7 +130,7 @@ int foomain(int argc, char **argv) { } #pragma omp parallel shared(i) #pragma omp parallel private(i) -#pragma omp parallel sections firstprivate(j) // expected-error {{arguments of OpenMP clause 'firstprivate' cannot be of reference type}} +#pragma omp parallel sections firstprivate(j) { foo(); } @@ -171,7 +171,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 sections firstprivate // expected-error {{expected '(' after 'firstprivate'}} { foo(); @@ -266,7 +266,7 @@ int main(int argc, char **argv) { { foo(); } -#pragma omp parallel sections firstprivate(j) // expected-error {{arguments of OpenMP clause 'firstprivate' cannot be of reference type}} +#pragma omp parallel sections firstprivate(j) { foo(); } @@ -298,6 +298,11 @@ int main(int argc, char **argv) { { foo(); } + static int r; +#pragma omp parallel sections firstprivate(r) // OK + { + foo(); + } return foomain<S4, S5>(argc, argv); // expected-note {{in instantiation of function template specialization 'foomain<S4, S5>' requested here}} } |