[Bug fortran/43193] [OOP] Calling type-bound procedure of abstract type wrongly rejected
burnus at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Sat Feb 27 00:04:00 GMT 2010
------- Comment #1 from burnus at gcc dot gnu dot org 2010-02-27 00:04 -------
Draft patch:
Index: gcc/fortran/resolve.c
===================================================================
--- gcc/fortran/resolve.c (Revision 157097)
+++ gcc/fortran/resolve.c
@@ -4902,10 +4902,11 @@ check_typebound_baseobject (gfc_expr* e)
gcc_assert (base->ts.type == BT_DERIVED || base->ts.type == BT_CLASS);
- if (base->ts.type == BT_DERIVED && base->ts.u.derived->attr.abstract)
+ if (e->value.compcall.tbp->deferred)
{
- gfc_error ("Base object for type-bound procedure call at %L is of"
- " ABSTRACT type '%s'", &e->where, base->ts.u.derived->name);
+ gfc_error ("Type bound-bound procedure of base type '%s' in call "
+ "at %L has a DEFERRED binding", base->ts.u.derived->name,
+ &e->where);
return FAILURE;
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43193
More information about the Gcc-bugs
mailing list