From 05be1da24cd947187a8b750e9eca45e80d2e7414 Mon Sep 17 00:00:00 2001 From: Alexey Bataev Date: Thu, 18 Jul 2019 17:49:13 +0000 Subject: [OPENMP]Provide correct data sharing attributes for loop control variables. Loop control variables are private in loop-based constructs and we shall take this into account when generate the code for inner constructs. Currently, those variables are reported as shared in many cases. Moved the analysis of the data-sharing attributes of the loop control variable to an early semantic stage to correctly handle their attributes. llvm-svn: 366474 --- clang/test/OpenMP/taskloop_firstprivate_messages.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'clang/test/OpenMP/taskloop_firstprivate_messages.cpp') diff --git a/clang/test/OpenMP/taskloop_firstprivate_messages.cpp b/clang/test/OpenMP/taskloop_firstprivate_messages.cpp index 9ef869f50ae..b5311f5e27f 100644 --- a/clang/test/OpenMP/taskloop_firstprivate_messages.cpp +++ b/clang/test/OpenMP/taskloop_firstprivate_messages.cpp @@ -150,11 +150,11 @@ int foomain(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp parallel private(i) -#pragma omp taskloop 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' directive may not be firstprivate, predetermined as private}} +#pragma omp taskloop firstprivate(i) // expected-note 2 {{defined as firstprivate}} + for (i = 0; i < argc; ++i) // expected-error 2 {{loop iteration variable in the associated loop of 'omp taskloop' directive may not be firstprivate, predetermined as private}} foo(); -#pragma omp parallel reduction(+ : i) -#pragma omp taskloop firstprivate(i) // expected-note {{defined as firstprivate}} +#pragma omp parallel reduction(+ : i) // expected-note {{defined as reduction}} +#pragma omp taskloop firstprivate(i) // expected-note {{defined as firstprivate}} 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 {{loop iteration variable in the associated loop of 'omp taskloop' directive may not be firstprivate, predetermined as private}} foo(); return 0; -- cgit v1.2.3