aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/resolve.c
diff options
context:
space:
mode:
authorDaniel Kraft <d@domob.eu>2008-09-23 16:26:47 +0200
committerDaniel Kraft <domob@gcc.gnu.org>2008-09-23 16:26:47 +0200
commitf0ac18b79931a074b5bc88e0b64ea8ef84e40941 (patch)
treec7feacbab392296b48eedf075c4af711194f8b63 /gcc/fortran/resolve.c
parentf0580031a7919f8e1401db1c2e6515e1682eaaa7 (diff)
downloadgcc-f0ac18b79931a074b5bc88e0b64ea8ef84e40941.zip
gcc-f0ac18b79931a074b5bc88e0b64ea8ef84e40941.tar.gz
gcc-f0ac18b79931a074b5bc88e0b64ea8ef84e40941.tar.bz2
re PR fortran/37588 (GENERIC type-bound procedure is not resolved)
2008-09-23 Daniel Kraft <d@domob.eu> 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 <d@domob.eu> PR fortran/37588 * gfortran.dg/typebound_generic_4.f03: New test. * gfortran.dg/typebound_generic_5.f03: New test. From-SVN: r140594
Diffstat (limited to 'gcc/fortran/resolve.c')
-rw-r--r--gcc/fortran/resolve.c6
1 files changed, 4 insertions, 2 deletions
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);