From ba29dca90d1b948654eeb69c25cfc763c99b1971 Mon Sep 17 00:00:00 2001 From: Mikael Morin Date: Wed, 9 Jan 2013 20:18:44 +0000 Subject: re PR fortran/47203 (USE of module with same name as SUBROUTINE not reject, but also not working) PR fortran/47203 * module.c (check_for_ambiguous): Get the current program unit using gfc_current_ns. PR fortran/47203 * gfortran.dg/use_28.f90: New test. From-SVN: r195065 --- gcc/fortran/module.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/fortran/module.c') diff --git a/gcc/fortran/module.c b/gcc/fortran/module.c index f3b3caa..604acbb 100644 --- a/gcc/fortran/module.c +++ b/gcc/fortran/module.c @@ -4493,7 +4493,7 @@ check_for_ambiguous (gfc_symbol *st_sym, pointer_info *info) module_locus locus; symbol_attribute attr; - if (st_sym->ns->proc_name && st_sym->name == st_sym->ns->proc_name->name) + if (st_sym->name == gfc_current_ns->proc_name->name) { gfc_error ("'%s' of module '%s', imported at %C, is also the name of the " "current program unit", st_sym->name, module_name); -- cgit v1.1