From e8ed37508957f989a10b0d66dc0910ced0b2716b Mon Sep 17 00:00:00 2001 From: Janus Weil Date: Sat, 4 Jan 2014 10:25:04 +0100 Subject: re PR fortran/59547 ([OOP] Problem with using tbp specification function in multiple class procedures) 2014-01-04 Janus Weil PR fortran/59547 * class.c (add_proc_comp): Copy pure attribute. 2014-01-04 Janus Weil PR fortran/59547 * gfortran.dg/typebound_proc_32.f90: New. From-SVN: r206331 --- gcc/fortran/class.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gcc/fortran/class.c') diff --git a/gcc/fortran/class.c b/gcc/fortran/class.c index 47a3082..1b243f6 100644 --- a/gcc/fortran/class.c +++ b/gcc/fortran/class.c @@ -714,9 +714,11 @@ add_proc_comp (gfc_symbol *vtype, const char *name, gfc_typebound_proc *tb) if (tb->u.specific) { - c->ts.interface = tb->u.specific->n.sym; + gfc_symbol *ifc = tb->u.specific->n.sym; + c->ts.interface = ifc; if (!tb->deferred) c->initializer = gfc_get_variable_expr (tb->u.specific); + c->attr.pure = ifc->attr.pure; } } -- cgit v1.1