------- Comment #7 from janus at gcc dot gnu dot org 2009-12-04 19:43 -------
(In reply to comment #6)
> I think the problem is that c->tb->ppc is not set correctly for the PPCs
> inside
> vtype.
The following patches fixes it:
Index: gcc/fortran/symbol.c
===================================================================
--- gcc/fortran/symbol.c (revision 154956)
+++ gcc/fortran/symbol.c (working copy)
@@ -4751,6 +4751,7 @@ add_proc_component (gfc_component *c, gfc_symbol *
if (!c->tb)
c->tb = XCNEW (gfc_typebound_proc);
*c->tb = *st->n.tb;
+ c->tb->ppc = 1;
c->attr.procedure = 1;
c->attr.proc_pointer = 1;
c->attr.flavor = FL_PROCEDURE;
@@ -4790,6 +4791,7 @@ add_proc_comps (gfc_component *c, gfc_symbol *vtyp
else if (c->attr.proc_pointer && c->tb)
{
*c->tb = *st->n.tb;
+ c->tb->ppc = 1;
c->ts.interface = st->n.tb->u.specific->n.sym;
}
}
@@ -4886,7 +4888,7 @@ copy_vtab_proc_comps (gfc_symbol *declared, gfc_sy
c->attr.flavor = FL_PROCEDURE;
c->attr.access = ACCESS_PRIVATE;
c->attr.external = 1;
- c->ts.interface = cmp->tb->u.specific->n.sym;
+ c->ts.interface = cmp->ts.interface;
c->attr.untyped = 1;
c->attr.if_source = IFSRC_IFBODY;
c->initializer = gfc_get_expr ();
--
janus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |janus at gcc dot gnu dot org
|dot org |
Status|NEW |ASSIGNED
Last reconfirmed|2009-12-04 15:57:20 |2009-12-04 19:43:51
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42274