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/target_simd_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/target_simd_firstprivate_messages.cpp')
| -rw-r--r-- | clang/test/OpenMP/target_simd_firstprivate_messages.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/test/OpenMP/target_simd_firstprivate_messages.cpp b/clang/test/OpenMP/target_simd_firstprivate_messages.cpp index c26ef158f87..651afdde8ab 100644 --- a/clang/test/OpenMP/target_simd_firstprivate_messages.cpp +++ b/clang/test/OpenMP/target_simd_firstprivate_messages.cpp @@ -136,12 +136,12 @@ int foomain(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp parallel private(i) -#pragma omp target 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 target simd' directive may not be firstprivate, predetermined as linear}} +#pragma omp target simd 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 target simd' directive may not be firstprivate, predetermined as linear}} foo(); #pragma omp parallel reduction(+ : i) -#pragma omp target 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 target simd' directive may not be firstprivate, predetermined as linear}} +#pragma omp target simd 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 target simd' directive may not be firstprivate, predetermined as linear}} foo(); return 0; } |

