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/parallel_for_simd_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/parallel_for_simd_firstprivate_messages.cpp')
-rw-r--r-- | test/OpenMP/parallel_for_simd_firstprivate_messages.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/test/OpenMP/parallel_for_simd_firstprivate_messages.cpp b/test/OpenMP/parallel_for_simd_firstprivate_messages.cpp index 2ff3224..7a08572 100644 --- a/test/OpenMP/parallel_for_simd_firstprivate_messages.cpp +++ b/test/OpenMP/parallel_for_simd_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 for simd firstprivate // expected-error {{expected '(' after 'firstprivate'}} for (int k = 0; k < argc; ++k) ++k; @@ -116,7 +116,7 @@ int foomain(int argc, char **argv) { } #pragma omp parallel shared(i) #pragma omp parallel private(i) -#pragma omp parallel for simd firstprivate(j) // expected-error {{arguments of OpenMP clause 'firstprivate' cannot be of reference type}} +#pragma omp parallel for simd firstprivate(j) for (int k = 0; k < argc; ++k) ++k; #pragma omp parallel for simd firstprivate(i) @@ -152,7 +152,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 for simd firstprivate // expected-error {{expected '(' after 'firstprivate'}} for (i = 0; i < argc; ++i) foo(); @@ -226,7 +226,7 @@ int main(int argc, char **argv) { #pragma omp parallel for simd firstprivate(xa) // OK: may be firstprivate for (i = 0; i < argc; ++i) foo(); -#pragma omp parallel for simd firstprivate(j) // expected-error {{arguments of OpenMP clause 'firstprivate' cannot be of reference type}} +#pragma omp parallel for simd firstprivate(j) for (i = 0; i < argc; ++i) foo(); #pragma omp parallel for simd lastprivate(g) firstprivate(g) // expected-error {{calling a private constructor of class 'S5'}} @@ -253,6 +253,10 @@ int main(int argc, char **argv) { #pragma omp parallel for simd firstprivate(i) // expected-note {{defined as firstprivate}} for (i = 0; i < argc; ++i) // expected-error {{loop iteration variable in the associated loop of 'omp parallel for simd' directive may not be firstprivate, predetermined as linear}} foo(); + static int si; +#pragma omp parallel for simd firstprivate(si) // OK + for (i = 0; i < argc; ++i) + si = i + 2; return foomain<S4, S5>(argc, argv); // expected-note {{in instantiation of function template specialization 'foomain<S4, S5>' requested here}} } |