This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/80766] [7/8 Regression] [OOP] ICE with type-bound procedure returning an array


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80766

--- Comment #5 from janus at gcc dot gnu.org ---
I have investigated a bit on the origin of the problem, and it seems that it is
related to the vtype symbols not being resolved properly (and the TBP component
having the type BT_UNKNOWN although it's a REAL function).

This rather simple patch fixes the ICE on trunk:

Index: gcc/fortran/resolve.c
===================================================================
--- gcc/fortran/resolve.c       (revision 247818)
+++ gcc/fortran/resolve.c       (working copy)
@@ -13833,6 +13833,9 @@ resolve_fl_derived (gfc_symbol *sym)
          gcc_assert (vtab);
          vptr->ts.u.derived = vtab->ts.u.derived;
        }
+
+      if (!resolve_fl_derived0 (vptr->ts.u.derived))
+       return false;
     }

   if (!resolve_fl_derived0 (sym))

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]