From 27372c38aa5b12ad197b47331e5bd663702490b3 Mon Sep 17 00:00:00 2001 From: Paul Thomas Date: Fri, 12 Oct 2007 16:51:53 +0000 Subject: re PR fortran/33542 (gfortran does not detect ambigious specific names if they are the same as generic names) 2007-10-12 Paul Thomas PR fortran/33542 * resolve.c (resolve_actual_arglist): If the actual argument is ambiguous, then there is an error. 2007-10-12 Paul Thomas PR fortran/33542 * gfortran.dg/ambiguous_specific_1.f90: New test. From-SVN: r129268 --- gcc/fortran/ChangeLog | 6 ++++++ gcc/fortran/resolve.c | 7 +++++++ 2 files changed, 13 insertions(+) (limited to 'gcc/fortran') diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index c6e6d7e..92a7570 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,5 +1,11 @@ 2007-10-12 Paul Thomas + PR fortran/33542 + * resolve.c (resolve_actual_arglist): If the actual argument is + ambiguous, then there is an error. + +2007-10-12 Paul Thomas + PR fortran/33664 * expr.c (gfc_specification_expr): If a function is not external, intrinsic or pure is an error. Set the symbol pure diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index 2686c3d..26c139c 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -971,6 +971,13 @@ resolve_actual_arglist (gfc_actual_arglist *arg, procedure_type ptype) continue; } + if (e->expr_type == FL_VARIABLE && e->symtree->ambiguous) + { + gfc_error ("'%s' at %L is ambiguous", e->symtree->n.sym->name, + &e->where); + return FAILURE; + } + if (e->ts.type != BT_PROCEDURE) { if (gfc_resolve_expr (e) != SUCCESS) -- cgit v1.1