[flang-commits] [flang] [flang] handle intrinsic interfaces in FunctionRef::GetType (PR #89583)

via flang-commits flang-commits at lists.llvm.org
Mon Apr 22 09:09:05 PDT 2024


================
@@ -287,15 +287,19 @@ template <typename A> class FunctionRef : public ProcedureRef {
       : ProcedureRef{std::move(p), std::move(a)} {}
 
   std::optional<DynamicType> GetType() const {
-    if (auto type{proc_.GetType()}) {
-      // TODO: Non constant explicit length parameters of PDTs result should
-      // likely be dropped too. This is not as easy as for characters since some
-      // long lived DerivedTypeSpec pointer would need to be created here. It is
-      // not clear if this is causing any issue so far since the storage size of
-      // PDTs is independent of length parameters.
-      return type->DropNonConstantCharacterLength();
+    if constexpr (IsLengthlessIntrinsicType<A>) {
+      return A::GetType();
+    } else {
----------------
jeanPerier wrote:

Agreed. Updated.

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


More information about the flang-commits mailing list