[flang-commits] [flang] [flang][OpenMP] Allocate `allocatable` init temps on the stack for GPUs (PR #164761)
Kelvin Li via flang-commits
flang-commits at lists.llvm.org
Fri Oct 24 11:03:36 PDT 2025
kkwli wrote:
If the allocatable variable is mapped, reallocation by assignment is not allowed
"If a list item of a map clause is an allocatable variable or is the subobject of an allocatable variable, the original list item must not be allocated, deallocated or reshaped while the corresponding list item has allocated storage."
"If the allocation status of a mapped variable or a list item that appears in a has_device_addr clause that has the ALLOCATABLE attribute is unallocated on entry to a target region, the allocation status of the corresponding variable in the device data environment must be unallocated upon exiting the region."
"If the allocation status of a mapped variable or a list item that appears in a has_device_addr clause that has the ALLOCATABLE attribute is allocated on entry to a target region, the allocation status and shape of the corresponding variable in the device data environment may not be changed, either explicitly or implicitly, in the region after entry to it."
https://github.com/llvm/llvm-project/pull/164761
More information about the flang-commits
mailing list