http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52552
--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-03-12 11:24:23 UTC --- More details: For gfc_match_allocate (match.c), one has: 3538 if (!gfc_type_compatible (&tail->expr->ts, &ts)) and then in gfc_type_compatible: (gdb) p ts1->type $6 = BT_CLASS (gdb) p ts2->type $7 = BT_DERIVED (gdb) p ts1->u.derived->components $10 = (gfc_component *) 0x16da1f0 (gdb) p ts1->u.derived->components->ts.u.derived $12 = (gfc_symbol *) 0x0 Which is used for: 4848 if (is_class1 && is_derived2) 4849 return gfc_type_is_extension_of(ts1->u.derived->components->ts.u.derived, 4850 ts2->u.derived); Due to the lacking ALLOCATE, tail->expr->ts.u.derived->attr.is_class == 1 Thus, one should check it. The question is only where: In gfc_match_allocate or in gfc_type_compatible?