diff options
author | dim <dim@FreeBSD.org> | 2015-12-30 11:49:41 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2015-12-30 11:49:41 +0000 |
commit | 3176e97f130184ece0e1a21352c8124cc83ff24a (patch) | |
tree | 0a5b74c0b9ca73aded34df95c91fcaf3815230d8 /test/OpenMP/sections_firstprivate_messages.cpp | |
parent | 1e9b8d38881c3213d1e67b0c47ab9b2c00721a5c (diff) | |
download | FreeBSD-src-3176e97f130184ece0e1a21352c8124cc83ff24a.zip FreeBSD-src-3176e97f130184ece0e1a21352c8124cc83ff24a.tar.gz |
Vendor import of clang trunk r256633:
https://llvm.org/svn/llvm-project/cfe/trunk@256633
Diffstat (limited to 'test/OpenMP/sections_firstprivate_messages.cpp')
-rw-r--r-- | test/OpenMP/sections_firstprivate_messages.cpp | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/test/OpenMP/sections_firstprivate_messages.cpp b/test/OpenMP/sections_firstprivate_messages.cpp index ff76149..cd2b4b8 100644 --- a/test/OpenMP/sections_firstprivate_messages.cpp +++ b/test/OpenMP/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 #pragma omp sections firstprivate // expected-error {{expected '(' after 'firstprivate'}} { @@ -135,7 +135,7 @@ int foomain(int argc, char **argv) { { int v = 0; int i; // expected-note {{variable with automatic storage duration is predetermined as private; perhaps you forget to enclose 'omp sections' directive into a parallel or another task region?}} -#pragma omp sections firstprivate(i) // expected-error {{private variable cannot be firstprivate}} +#pragma omp sections firstprivate(i) // expected-error {{firstprivate variable must be shared}} { foo(); } @@ -143,7 +143,7 @@ int foomain(int argc, char **argv) { } #pragma omp parallel shared(i) #pragma omp parallel private(i) -#pragma omp sections firstprivate(j) // expected-error {{arguments of OpenMP clause 'firstprivate' cannot be of reference type}} +#pragma omp sections firstprivate(j) { foo(); } @@ -186,7 +186,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 firstprivate // expected-error {{expected '(' after 'firstprivate'}} { @@ -304,7 +304,7 @@ int main(int argc, char **argv) { foo(); } #pragma omp parallel -#pragma omp sections firstprivate(j) // expected-error {{arguments of OpenMP clause 'firstprivate' cannot be of reference type}} +#pragma omp sections firstprivate(j) { foo(); } @@ -322,7 +322,7 @@ int main(int argc, char **argv) { { int v = 0; int i; // expected-note {{variable with automatic storage duration is predetermined as private; perhaps you forget to enclose 'omp sections' directive into a parallel or another task region?}} -#pragma omp sections firstprivate(i) // expected-error {{private variable cannot be firstprivate}} +#pragma omp sections firstprivate(i) // expected-error {{firstprivate variable must be shared}} { foo(); } @@ -338,6 +338,11 @@ int main(int argc, char **argv) { { foo(); } + static int r; +#pragma omp sections firstprivate(r) // OK + { + foo(); + } return foomain<S4, S5>(argc, argv); // expected-note {{in instantiation of function template specialization 'foomain<S4, S5>' requested here}} } |