[flang-commits] [flang] [Flang][OpenMP] Remove close map type member removal code from MapInfoFinalization (PR #219438)
Akash Banerjee via flang-commits
flang-commits at lists.llvm.org
Tue Sep 8 06:52:16 PDT 2026
https://github.com/TIFitis commented:
Can you please check if this would affect the following case?
```
program test
!$omp requires unified_shared_memory
type t
integer :: x, y
end type
type(t) :: s = t(1, 2)
!$omp target map(close, tofrom: s%x, s%y)
s%x = 10
s%y = 20
!$omp end target
print *, s%x, s%y ! Expected: 10, 20
end program
```
The compiler-generated partial parent has no close. Removing this cleanup leaves separate device allocations for the components, while the kernel accesses both through one parent pointer, potentially accessing outside the first allocation. We might need to add coverage for this case before the cleanup.
https://github.com/llvm/llvm-project/pull/219438
More information about the flang-commits
mailing list