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/59765] [4.9 Regression] [OOP] ICE on valid with allocatable component


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

--- Comment #5 from janus at gcc dot gnu.org ---
In particular this code in finalize_component produces a full-array reference
for array components:

  if (comp->attr.dimension || comp->attr.codimension
      || (comp->ts.type == BT_CLASS && CLASS_DATA (comp)
      && (CLASS_DATA (comp)->attr.dimension
          || CLASS_DATA (comp)->attr.codimension)))
    {
      ref->next = gfc_get_ref ();
      ref->next->type = REF_ARRAY;
      ref->next->u.ar.dimen = 0;
      ref->next->u.ar.as = comp->ts.type == BT_CLASS ? CLASS_DATA (comp)->as
                            : comp->as;
      e->rank = ref->next->u.ar.as->rank;
      ref->next->u.ar.type = e->rank ? AR_FULL : AR_ELEMENT;
    }


Either we have to scalarize this later on (this is currently not implemented,
because this is forbidden in actual Fortran code, see comment 4), or we have to
generate a loop directly instead of the full-array expression.


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