diff options
Diffstat (limited to 'gcc/fortran/interface.c')
-rw-r--r-- | gcc/fortran/interface.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/fortran/interface.c b/gcc/fortran/interface.c index c4a6882..429abc7 100644 --- a/gcc/fortran/interface.c +++ b/gcc/fortran/interface.c @@ -3798,8 +3798,16 @@ gfc_procedure_use (gfc_symbol *sym, gfc_actual_arglist **ap, locus *where) explicitly declared at all if requested. */ if (sym->attr.if_source == IFSRC_UNKNOWN && !sym->attr.is_iso_c) { + bool has_implicit_none_export = false; implicit = true; - if (sym->ns->has_implicit_none_export && sym->attr.proc == PROC_UNKNOWN) + if (sym->attr.proc == PROC_UNKNOWN) + for (gfc_namespace *ns = sym->ns; ns; ns = ns->parent) + if (ns->has_implicit_none_export) + { + has_implicit_none_export = true; + break; + } + if (has_implicit_none_export) { const char *guessed = gfc_lookup_function_fuzzy (sym->name, sym->ns->sym_root); |