summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKrzysztof Parzyszek <Krzysztof.Parzyszek@amd.com>2024-05-15 08:57:45 -0500
committerGitHub <noreply@github.com>2024-05-15 08:57:45 -0500
commit97a30448f9477e0196f9340303aa20d544f1629a (patch)
tree996bce851abe91da4f9112c1d420aadfa96f0946
parentc2fba6df944e11e2c9a7073405c6a817fdba14e3 (diff)
downloadllvm-libc-upstream-main.tar.gz
[flang][OpenMP] Add `private` to `allocate` in parallel-sections.f90 (#92185)upstream-main
Add a privatizing clause to the construct that uses `allocate` clause. Amend the CHECK lines to reflect the expected output.
-rw-r--r--flang/test/Lower/OpenMP/parallel-sections.f909
1 files changed, 3 insertions, 6 deletions
diff --git a/flang/test/Lower/OpenMP/parallel-sections.f90 b/flang/test/Lower/OpenMP/parallel-sections.f90
index 2f78dd4562b0..285102e06cad 100644
--- a/flang/test/Lower/OpenMP/parallel-sections.f90
+++ b/flang/test/Lower/OpenMP/parallel-sections.f90
@@ -39,13 +39,10 @@ end subroutine omp_parallel_sections
subroutine omp_parallel_sections_allocate(x, y)
use omp_lib
integer, intent(inout) :: x, y
+ !CHECK: omp.parallel
!CHECK: %[[allocator_1:.*]] = arith.constant 4 : i64
- !CHECK: %[[allocator_2:.*]] = arith.constant 4 : i64
- !CHECK: omp.parallel allocate(
- !CHECK: %[[allocator_2]] : i64 -> %{{.*}} : !fir.ref<i32>) {
- !CHECK: omp.sections allocate(
- !CHECK: %[[allocator_1]] : i64 -> %{{.*}} : !fir.ref<i32>) {
- !$omp parallel sections allocate(omp_high_bw_mem_alloc: x)
+ !CHECK: omp.sections allocate(%[[allocator_1]] : i64 -> %{{.*}} : !fir.ref<i32>) {
+ !$omp parallel sections allocate(omp_high_bw_mem_alloc: x) private(x, y)
!CHECK: omp.section {
!$omp section
x = x + 12