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_private_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_private_messages.cpp')
-rw-r--r-- | test/OpenMP/parallel_for_simd_private_messages.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/test/OpenMP/parallel_for_simd_private_messages.cpp b/test/OpenMP/parallel_for_simd_private_messages.cpp index 130736a..a031d40 100644 --- a/test/OpenMP/parallel_for_simd_private_messages.cpp +++ b/test/OpenMP/parallel_for_simd_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 parallel for simd private // expected-error {{expected '(' after 'private'}} for (int k = 0; k < argc; ++k) ++k; @@ -99,7 +99,7 @@ int foomain(I argc, C **argv) { } #pragma omp parallel shared(i) #pragma omp parallel private(i) -#pragma omp parallel for simd private(j) // expected-error {{arguments of OpenMP clause 'private' cannot be of reference type}} +#pragma omp parallel for simd private(j) for (int k = 0; k < argc; ++k) ++k; #pragma omp parallel for simd private(i) @@ -120,7 +120,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 parallel for simd private // expected-error {{expected '(' after 'private'}} for (int k = 0; k < argc; ++k) ++k; @@ -169,12 +169,16 @@ int main(int argc, char **argv) { } #pragma omp parallel shared(i) #pragma omp parallel private(i) -#pragma omp parallel for simd private(j) // expected-error {{arguments of OpenMP clause 'private' cannot be of reference type}} +#pragma omp parallel for simd private(j) for (int k = 0; k < argc; ++k) ++k; #pragma omp parallel for simd private(i) for (int k = 0; k < argc; ++k) ++k; + static int m; +#pragma omp parallel for simd private(m) // OK + for (int k = 0; k < argc; ++k) + m = k + 3; return 0; } |