[llvm-branch-commits] [flang] [Flang][OpenMP] Derived type explicit allocatable member mapping (PR #96266)

Kareem Ergawy via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Sun Jul 14 22:56:35 PDT 2024


================
@@ -953,6 +954,22 @@ bool ClauseProcessor::processMap(
           if (origSymbol && fir::isTypeWithDescriptor(origSymbol.getType()))
             symAddr = origSymbol;
 
+          if (object.sym()->owner().IsDerivedType()) {
+            omp::ObjectList objectList = gatherObjects(object, semaCtx);
+            parentObj = objectList[0];
+            parentMemberIndices.insert({parentObj.value(), {}});
+            if (Fortran::semantics::IsAllocatableOrObjectPointer(
+                    object.sym()) ||
+                memberHasAllocatableParent(object, semaCtx)) {
----------------
ergawy wrote:

```suggestion
            if (isMemberOrParentAllocatableOrPointer(object.sym())) {
```

https://github.com/llvm/llvm-project/pull/96266


More information about the llvm-branch-commits mailing list