summaryrefslogtreecommitdiffstats
path: root/clang/test/OpenMP/parallel_for_linear_messages.cpp
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2019-08-08 13:42:45 +0000
committerAlexey Bataev <a.bataev@hotmail.com>2019-08-08 13:42:45 +0000
commit195ae90307bdbfcb7393da5dfbbb2bb38ff24107 (patch)
tree4c0daa8ff6be1d52428c941364bc749b15410320 /clang/test/OpenMP/parallel_for_linear_messages.cpp
parentc822ab8f9accc63e5a4fa01273f257653360dacc (diff)
downloadbcm5719-llvm-195ae90307bdbfcb7393da5dfbbb2bb38ff24107.tar.gz
bcm5719-llvm-195ae90307bdbfcb7393da5dfbbb2bb38ff24107.zip
[OPENMP]Add support for analysis of linear variables and step.
Summary: Added support for basic analysis of the linear variables and linear step expression. Linear loop iteration variables must be excluded from this analysis, only non-loop iteration variables must be analyzed. Reviewers: NoQ Subscribers: guansong, cfe-commits, caomhin, kkwli0 Tags: #clang Differential Revision: https://reviews.llvm.org/D65461 llvm-svn: 368295
Diffstat (limited to 'clang/test/OpenMP/parallel_for_linear_messages.cpp')
-rw-r--r--clang/test/OpenMP/parallel_for_linear_messages.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/test/OpenMP/parallel_for_linear_messages.cpp b/clang/test/OpenMP/parallel_for_linear_messages.cpp
index b10557163b0..a6dc1fdde63 100644
--- a/clang/test/OpenMP/parallel_for_linear_messages.cpp
+++ b/clang/test/OpenMP/parallel_for_linear_messages.cpp
@@ -3,6 +3,14 @@
// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
extern int omp_default_mem_alloc;
+
+void xxx(int argc) {
+ int i, lin, step; // expected-note {{initialize the variable 'lin' to silence this warning}} expected-note {{initialize the variable 'step' to silence this warning}}
+#pragma omp parallel for linear(lin : step) // expected-warning {{variable 'lin' is uninitialized when used here}} expected-warning {{variable 'step' is uninitialized when used here}}
+ for (i = 0; i < 10; ++i)
+ ;
+}
+
namespace X {
int x;
};
OpenPOWER on IntegriCloud