[flang-commits] [flang] [flang][OpenMP] Attach compiler-emitted mappers to arrays of records (PR #179892)
Akash Banerjee via flang-commits
flang-commits at lists.llvm.org
Fri Feb 6 08:58:48 PST 2026
================
@@ -2784,7 +2784,8 @@ genTargetOp(lower::AbstractConverter &converter, lower::SymMap &symTable,
if (!mapperIdName.empty()) {
bool allowImplicitMapper =
- semantics::IsAllocatableOrObjectPointer(&sym);
+ semantics::IsAllocatableOrObjectPointer(&sym) ||
+ requiresImplicitDefaultDeclareMapper(*typeSpec);
----------------
TIFitis wrote:
```suggestion
semantics::IsAllocatableOrObjectPointer(&sym);
if (!allowImplicitMapper &&
requiresImplicitDefaultDeclareMapper(*typeSpec)) {
// MapInfoFinalization can expand implicit mappings for scalar
// records with allocatable members. Arrays of records are not
// handled there yet, so allow the implicit default mapper for
// arrays (and for ISO C types which always require a mapper).
allowImplicitMapper =
semantics::IsIsoCType(typeSpec) || sym.Rank() > 0;
}
```
https://github.com/llvm/llvm-project/pull/179892
More information about the flang-commits
mailing list