https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126210
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Last reconfirmed| |2026-07-11
Status|UNCONFIRMED |NEW
--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Drea Pinski from comment #1)
> Note the testcases have twice (or more):
> use omp_lib
Backout the module.cc change:
diff --git a/gcc/fortran/module.cc b/gcc/fortran/module.cc
index f7bf5854d74..3bb81bab68a 100644
--- a/gcc/fortran/module.cc
+++ b/gcc/fortran/module.cc
@@ -6053,19 +6053,6 @@ read_module (void)
module_name, 0))
continue;
- /* Skip re-importing a symbol already visible via host association
- from the same module. */
- if (!only_flag && !info->u.rsym.renamed
- && strcmp (name, module_name) != 0
- && gfc_current_ns->parent)
- {
- gfc_symbol *host_sym;
- gfc_find_symbol (name, gfc_current_ns, 1, &host_sym);
- if (host_sym && host_sym->module
- && strcmp (host_sym->module, module_name) == 0)
- continue;
- }
-
st = gfc_find_symtree (gfc_current_ns->sym_root, p);
if (st != NULL
fixes this regression without failing PR fortran/126170 test.