diff options
author | Kelvin Li <kkwli0@gmail.com> | 2015-09-15 18:56:58 +0000 |
---|---|---|
committer | Kelvin Li <kkwli0@gmail.com> | 2015-09-15 18:56:58 +0000 |
commit | 4f0ecf9232938ee586530a39606a66f4cbac8fa3 (patch) | |
tree | 71d9639abe45fd380536eb07a32fb27a209a5511 /test/OpenMP/for_simd_reduction_messages.cpp | |
parent | d3e4ec2683565b6d925c73c2e3c6828a6cd4b3bc (diff) |
Allow static local variables specified on data-sharing attribute clauses.
http://reviews.llvm.org/D11619
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247715 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/OpenMP/for_simd_reduction_messages.cpp')
-rw-r--r-- | test/OpenMP/for_simd_reduction_messages.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/OpenMP/for_simd_reduction_messages.cpp b/test/OpenMP/for_simd_reduction_messages.cpp index 74952776d5..2cd0179e10 100644 --- a/test/OpenMP/for_simd_reduction_messages.cpp +++ b/test/OpenMP/for_simd_reduction_messages.cpp @@ -353,6 +353,10 @@ int main(int argc, char **argv) { #pragma omp for simd reduction(+ : fl) // expected-error {{reduction variable must be shared}} for (int i = 0; i < 10; ++i) foo(); + static int m; +#pragma omp for simd reduction(+ : m) + for (int i = 0; i < 10; ++i) + m++; return tmain(argc) + tmain(fl); // expected-note {{in instantiation of function template specialization 'tmain<int>' requested here}} expected-note {{in instantiation of function template specialization 'tmain<float>' requested here}} } |