http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60234

janus at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |janus at gcc dot gnu.org

--- Comment #4 from janus at gcc dot gnu.org ---
The test case in comment 0 compiles cleanly when adding the following to the
patch in comment 2:

Index: gcc/fortran/class.c
===================================================================
--- gcc/fortran/class.c    (revision 207804)
+++ gcc/fortran/class.c    (working copy)
@@ -637,9 +637,10 @@ gfc_build_class_symbol (gfc_typespec *ts, symbol_a
       if (!gfc_add_component (fclass, "_vptr", &c))
     return false;
       c->ts.type = BT_DERIVED;
-      if (delayed_vtab
-      || (ts->u.derived->f2k_derived
-          && ts->u.derived->f2k_derived->finalizers))
+      if ((delayed_vtab
+       || (ts->u.derived->f2k_derived
+           && ts->u.derived->f2k_derived->finalizers))
+      && !ts->u.derived->attr.unlimited_polymorphic)
     c->ts.u.derived = NULL;
       else
     {

Reply via email to