https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115194
--- Comment #1 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The trunk branch has been updated by Jason Merrill <ja...@gcc.gnu.org>: https://gcc.gnu.org/g:8878fecc251762bc32c24e659695557797e03fd9 commit r15-1296-g8878fecc251762bc32c24e659695557797e03fd9 Author: Jason Merrill <ja...@redhat.com> Date: Wed Jun 12 21:44:10 2024 -0400 c++/modules: multiple usings of the same decl [PR115194] add_binding_entity creates an OVERLOAD to represent a using-declaration in module purview of a declaration in the global module, even for non-functions, and we were failing to merge that with the original declaration in name lookup. It's not clear to me that building the OVERLOAD is what should be happening, but let's work around it for now pending an overhaul of using-decl handling for c++/114683. PR c++/115194 gcc/cp/ChangeLog: * name-lookup.cc (name_lookup::process_module_binding): Strip an OVERLOAD from a non-function. gcc/testsuite/ChangeLog: * g++.dg/modules/using-23_a.C: New test. * g++.dg/modules/using-23_b.C: New test.