diff options
| author | Alexey Bataev <a.bataev@hotmail.com> | 2019-07-18 17:49:13 +0000 |
|---|---|---|
| committer | Alexey Bataev <a.bataev@hotmail.com> | 2019-07-18 17:49:13 +0000 |
| commit | 05be1da24cd947187a8b750e9eca45e80d2e7414 (patch) | |
| tree | dad30cd82ebcd2240874110eedfbc527bd680824 /clang/test/OpenMP/taskloop_firstprivate_messages.cpp | |
| parent | 3f1ab737e2199415c072fd6624a728949eb30342 (diff) | |
| download | bcm5719-llvm-05be1da24cd947187a8b750e9eca45e80d2e7414.tar.gz bcm5719-llvm-05be1da24cd947187a8b750e9eca45e80d2e7414.zip | |
[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
Diffstat (limited to 'clang/test/OpenMP/taskloop_firstprivate_messages.cpp')
| -rw-r--r-- | clang/test/OpenMP/taskloop_firstprivate_messages.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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; |

