diff options
author | Mikael Morin <mikael@gcc.gnu.org> | 2013-01-09 20:18:44 +0000 |
---|---|---|
committer | Mikael Morin <mikael@gcc.gnu.org> | 2013-01-09 20:18:44 +0000 |
commit | ba29dca90d1b948654eeb69c25cfc763c99b1971 (patch) | |
tree | 770cbf75028c945ef12e5f9224dc66ef0504f10a /gcc/fortran/module.c | |
parent | e1f2b72927b8dcad0c745a75d2ae23bce664d3d5 (diff) | |
download | gcc-ba29dca90d1b948654eeb69c25cfc763c99b1971.zip gcc-ba29dca90d1b948654eeb69c25cfc763c99b1971.tar.gz gcc-ba29dca90d1b948654eeb69c25cfc763c99b1971.tar.bz2 |
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
Diffstat (limited to 'gcc/fortran/module.c')
-rw-r--r-- | gcc/fortran/module.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |