[flang-commits] [flang] [flang] Expand parent component in procedure pointer component refere… (PR #78593)

via flang-commits flang-commits at lists.llvm.org
Fri Jan 19 03:02:28 PST 2024


================
@@ -113,10 +113,11 @@ static hlfir::EntityWithAttributes designateProcedurePointerComponent(
   auto recordType =
       hlfir::getFortranElementType(base.getType()).cast<fir::RecordType>();
   mlir::Type fieldType = recordType.getType(fieldName);
-  // FIXME: semantics is not expanding intermediate parent components in:
-  // call x%p() where p is a component of a parent type of x type.
+  // Note: semantics turns x%p() into x%t%p() when the procedure pointer
+  // component is part of parent component t.
   if (!fieldType)
-    TODO(loc, "reference to procedure pointer component from parent type");
+    fir::emitFatalError(loc,
+                        "procedure pointer component not found in FIR type");
----------------
jeanPerier wrote:

```suggestion
    TODO(loc, "passing type bound procedure (extension)");
```

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


More information about the flang-commits mailing list