aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/resolve.c
diff options
context:
space:
mode:
authorPaul Thomas <pault@gcc.gnu.org>2007-10-12 16:51:53 +0000
committerPaul Thomas <pault@gcc.gnu.org>2007-10-12 16:51:53 +0000
commit27372c38aa5b12ad197b47331e5bd663702490b3 (patch)
tree25476956d469782d5622fe99dc6a5d5b6c0a73b6 /gcc/fortran/resolve.c
parent98a36c7ca05d1acbd0a06c43bb0e0b0c4596ed5e (diff)
downloadgcc-27372c38aa5b12ad197b47331e5bd663702490b3.zip
gcc-27372c38aa5b12ad197b47331e5bd663702490b3.tar.gz
gcc-27372c38aa5b12ad197b47331e5bd663702490b3.tar.bz2
re PR fortran/33542 (gfortran does not detect ambigious specific names if they are the same as generic names)
2007-10-12 Paul Thomas <pault@gcc.gnu.org> PR fortran/33542 * resolve.c (resolve_actual_arglist): If the actual argument is ambiguous, then there is an error. 2007-10-12 Paul Thomas <pault@gcc.gnu.org> PR fortran/33542 * gfortran.dg/ambiguous_specific_1.f90: New test. From-SVN: r129268
Diffstat (limited to 'gcc/fortran/resolve.c')
-rw-r--r--gcc/fortran/resolve.c7
1 files changed, 7 insertions, 0 deletions
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)