https://gcc.gnu.org/g:52a24bcecd388ab6e7d4e6500809fc761f6e7ca5
commit r16-5173-g52a24bcecd388ab6e7d4e6500809fc761f6e7ca5 Author: Jason Merrill <[email protected]> Date: Mon Nov 10 18:32:53 2025 +0530 c++/modules: avoid too many hidden friends in ADL Most of the add_fns calls in adl_namespace_fns also call ovl_skip_hidden, but we were forgetting that in the case of imports, which meant that for 24_iterators/const_iterator/112490.cc we were considering the unreachable_sentinel_t hidden friend operator== and therefore failing. gcc/cp/ChangeLog: * name-lookup.cc (name_lookup::adl_namespace_fns): Also skip hidden in the module case. Diff: --- gcc/cp/name-lookup.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/cp/name-lookup.cc b/gcc/cp/name-lookup.cc index ef1360464c58..984d37c2089f 100644 --- a/gcc/cp/name-lookup.cc +++ b/gcc/cp/name-lookup.cc @@ -1338,6 +1338,7 @@ name_lookup::adl_namespace_fns (tree scope, bitmap imports, bind = STAT_VISIBLE (bind); } + bind = ovl_skip_hidden (bind); if (on_inst_path || visible) add_fns (bind); else
