From f0ac18b79931a074b5bc88e0b64ea8ef84e40941 Mon Sep 17 00:00:00 2001 From: Daniel Kraft Date: Tue, 23 Sep 2008 16:26:47 +0200 Subject: re PR fortran/37588 (GENERIC type-bound procedure is not resolved) 2008-09-23 Daniel Kraft PR fortran/37588 * gfortran.h (gfc_compare_actual_formal): Removed, made private. (gfc_arglist_matches_symbol): New method. * interface.c (compare_actual_formal): Made static. (gfc_procedure_use): Use new name of compare_actual_formal. (gfc_arglist_matches_symbol): New method. (gfc_search_interface): Moved code partially to new gfc_arglist_matches_symbol. * resolve.c (resolve_typebound_generic_call): Resolve actual arglist before checking against formal and use new gfc_arglist_matches_symbol for checking. (resolve_compcall): Set type-spec of generated expression. 2008-09-23 Daniel Kraft PR fortran/37588 * gfortran.dg/typebound_generic_4.f03: New test. * gfortran.dg/typebound_generic_5.f03: New test. From-SVN: r140594 --- gcc/fortran/resolve.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'gcc/fortran/resolve.c') diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index a7c62c3..d682e10 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -4510,10 +4510,11 @@ resolve_typebound_generic_call (gfc_expr* e) args = update_arglist_pass (args, po, g->specific->pass_arg_num); } + resolve_actual_arglist (args, target->attr.proc, + is_external_proc (target) && !target->formal); /* Check if this arglist matches the formal. */ - matches = gfc_compare_actual_formal (&args, target->formal, 1, - target->attr.elemental, NULL); + matches = gfc_arglist_matches_symbol (&args, target); /* Clean up and break out of the loop if we've found it. */ gfc_free_actual_arglist (args); @@ -4606,6 +4607,7 @@ resolve_compcall (gfc_expr* e) e->value.function.isym = NULL; e->value.function.esym = NULL; e->symtree = target; + e->ts = target->n.sym->ts; e->expr_type = EXPR_FUNCTION; return gfc_resolve_expr (e); -- cgit v1.1