http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47745
--- Comment #7 from janus at gcc dot gnu.org 2011-02-15 15:22:10 UTC --- (In reply to comment #6) > If I did not do any mistake, the patch in comment #5 breaks at least > gfortran.dg/typebound_operator_6.f03: Yes, I'm seeing that too. The following should take care of it: Index: decl.c =================================================================== --- decl.c (revision 170170) +++ decl.c (working copy) @@ -1639,7 +1639,9 @@ scalar: bool delayed = (gfc_state_stack->sym == c->ts.u.derived) || (!c->ts.u.derived->components && !c->ts.u.derived->attr.zero_comp); - return gfc_build_class_symbol (&c->ts, &c->attr, &c->as, delayed); + c->attr.class_ok = c->attr.dummy | c->attr.pointer | c->attr.allocatable; + if (c->attr.class_ok) + return gfc_build_class_symbol (&c->ts, &c->attr, &c->as, delayed); } return t; I will post a complete patch to the mailing list soon.