diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2015-12-25 13:38:08 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2015-12-25 13:38:08 +0000 |
commit | ee1775e00f7b7e6b6dc3e110dd6368f276031bfb (patch) | |
tree | 36564cf0bc6cecfcad4a96c7ba2394713893ad20 /test/OpenMP/for_simd_loop_messages.cpp | |
parent | 794a77e319dc84fc3faaa1ed0086f580bbf6d1ab (diff) |
[OPENMP] Do not allow to use threadprivate or thread local variables as loop iteration variables.
According to OpenMP the loop iteration variable may not appear in a threadprivate directive.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@256417 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/OpenMP/for_simd_loop_messages.cpp')
-rw-r--r-- | test/OpenMP/for_simd_loop_messages.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/OpenMP/for_simd_loop_messages.cpp b/test/OpenMP/for_simd_loop_messages.cpp index d336888d2b..958c7f60d0 100644 --- a/test/OpenMP/for_simd_loop_messages.cpp +++ b/test/OpenMP/for_simd_loop_messages.cpp @@ -10,6 +10,7 @@ public: }; static int sii; +// expected-note@+1 {{defined as threadprivate or thread local}} #pragma omp threadprivate(sii) static int globalii; @@ -306,6 +307,7 @@ int test_iteration_spaces() { #pragma omp parallel { +// expected-error@+2 {{loop iteration variable in the associated loop of 'omp for simd' directive may not be threadprivate or thread local, predetermined as linear}} #pragma omp for simd for (sii = 0; sii < 10; sii += 1) c[sii] = a[sii]; |