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

janus at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2013-12-14
                 CC|                            |janus at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #2 from janus at gcc dot gnu.org ---
The whole idea of using CLASS(*) with BLOCK DATA is rather sick if you ask me
;)

Anyway, here is a draft patch which helps to allow this bestiality (not
regtested):

Index: gcc/fortran/class.c
===================================================================
--- gcc/fortran/class.c    (revision 205983)
+++ gcc/fortran/class.c    (working copy)
@@ -644,7 +644,7 @@ 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
+      if (delayed_vtab || ts->u.derived->attr.unlimited_polymorphic
       || (ts->u.derived->f2k_derived
           && ts->u.derived->f2k_derived->finalizers))
     c->ts.u.derived = NULL;

Reply via email to