From 8a8c69808c36510da55a5b5225305bacc229a78a Mon Sep 17 00:00:00 2001 From: Alexey Bataev Date: Fri, 26 Jul 2019 14:50:05 +0000 Subject: [OPENMP]Add support for analysis of reduction variables. Summary: Reduction variables are the variables, for which the private copies must be created in the OpenMP regions. Then they are initialized with the predefined values depending on the reduction operation. After exit from the OpenMP region the original variable is updated using the reduction value and the value of the original reduction variable. Reviewers: NoQ Subscribers: guansong, jdoerfert, caomhin, kkwli0, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D65106 llvm-svn: 367116 --- clang/test/OpenMP/parallel_reduction_messages.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'clang/test/OpenMP/parallel_reduction_messages.cpp') diff --git a/clang/test/OpenMP/parallel_reduction_messages.cpp b/clang/test/OpenMP/parallel_reduction_messages.cpp index cb0ba7cf712..881615684c5 100644 --- a/clang/test/OpenMP/parallel_reduction_messages.cpp +++ b/clang/test/OpenMP/parallel_reduction_messages.cpp @@ -7,6 +7,13 @@ // RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized extern int omp_default_mem_alloc; +void xxx(int argc) { + int fp; // expected-note {{initialize the variable 'fp' to silence this warning}} +#pragma omp parallel reduction(+:fp) // expected-warning {{variable 'fp' is uninitialized when used here}} + for (int i = 0; i < 10; ++i) + ; +} + void foo() { } -- cgit v1.2.3