Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[flang][OpenMP] Add private to allocate in parallel-sections.f90 #92185

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions flang/test/Lower/OpenMP/parallel-sections.f90
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Comment on lines +44 to +45
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you miss the CHECK for parallel?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added.

!CHECK: omp.section {
!$omp section
x = x + 12
Expand Down
Loading