This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/59765] [4.9 Regression] [OOP] ICE on valid with allocatable component
- From: "janus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 10 Jan 2014 23:10:03 +0000
- Subject: [Bug fortran/59765] [4.9 Regression] [OOP] ICE on valid with allocatable component
- Auto-submitted: auto-generated
- References: <bug-59765-4 at http dot gcc dot gnu dot org/bugzilla/>
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.