Skip to content

Commit 97a3044

Browse files
authored
[flang][OpenMP] Add private to allocate in parallel-sections.f90 (#92185)
Add a privatizing clause to the construct that uses `allocate` clause. Amend the CHECK lines to reflect the expected output.
1 parent c2fba6d commit 97a3044

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

flang/test/Lower/OpenMP/parallel-sections.f90

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,10 @@ end subroutine omp_parallel_sections
3939
subroutine omp_parallel_sections_allocate(x, y)
4040
use omp_lib
4141
integer, intent(inout) :: x, y
42+
!CHECK: omp.parallel
4243
!CHECK: %[[allocator_1:.*]] = arith.constant 4 : i64
43-
!CHECK: %[[allocator_2:.*]] = arith.constant 4 : i64
44-
!CHECK: omp.parallel allocate(
45-
!CHECK: %[[allocator_2]] : i64 -> %{{.*}} : !fir.ref<i32>) {
46-
!CHECK: omp.sections allocate(
47-
!CHECK: %[[allocator_1]] : i64 -> %{{.*}} : !fir.ref<i32>) {
48-
!$omp parallel sections allocate(omp_high_bw_mem_alloc: x)
44+
!CHECK: omp.sections allocate(%[[allocator_1]] : i64 -> %{{.*}} : !fir.ref<i32>) {
45+
!$omp parallel sections allocate(omp_high_bw_mem_alloc: x) private(x, y)
4946
!CHECK: omp.section {
5047
!$omp section
5148
x = x + 12

0 commit comments

Comments
 (0)