summaryrefslogtreecommitdiffstats
path: root/clang/test/OpenMP/taskloop_simd_firstprivate_messages.cpp
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2018-10-29 15:01:58 +0000
committerAlexey Bataev <a.bataev@hotmail.com>2018-10-29 15:01:58 +0000
commit6ab5bb115a3491e799dfe00da39136f02247c251 (patch)
tree3d8dd63d655cbda273934e4b09281b24a104c384 /clang/test/OpenMP/taskloop_simd_firstprivate_messages.cpp
parentd7bca00ab0094918b9fd8674f4ac1d3cf6741b4e (diff)
downloadbcm5719-llvm-6ab5bb115a3491e799dfe00da39136f02247c251.tar.gz
bcm5719-llvm-6ab5bb115a3491e799dfe00da39136f02247c251.zip
[OPENMP] Do not capture private loop counters.
If the loop counter is not declared in the context of the loop and it is private, such loop counters should not be captured in the outlined regions. llvm-svn: 345505
Diffstat (limited to 'clang/test/OpenMP/taskloop_simd_firstprivate_messages.cpp')
-rw-r--r--clang/test/OpenMP/taskloop_simd_firstprivate_messages.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/test/OpenMP/taskloop_simd_firstprivate_messages.cpp b/clang/test/OpenMP/taskloop_simd_firstprivate_messages.cpp
index 66c9e7a2f8f..3fb5ad17064 100644
--- a/clang/test/OpenMP/taskloop_simd_firstprivate_messages.cpp
+++ b/clang/test/OpenMP/taskloop_simd_firstprivate_messages.cpp
@@ -301,6 +301,9 @@ int main(int argc, char **argv) {
#pragma omp taskloop simd firstprivate(i) // expected-error {{argument of a reduction clause of a parallel construct must not appear in a firstprivate clause on a task construct}}
for (i = 0; i < argc; ++i) // expected-error {{reduction variables may not be accessed in an explicit task}}
foo();
+#pragma omp taskloop 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 taskloop simd' directive may not be firstprivate, predetermined as linear}}
+ foo();
#pragma omp parallel
#pragma omp taskloop simd firstprivate(B::x) // expected-error {{threadprivate or thread local variable cannot be firstprivate}}
for (i = 0; i < argc; ++i)
OpenPOWER on IntegriCloud