https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116913
--- Comment #9 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Nathaniel Shead <nsh...@gcc.gnu.org>: https://gcc.gnu.org/g:6a1e109158940ce3a2d1ceed3e1b614ea6c9a2de commit r15-4060-g6a1e109158940ce3a2d1ceed3e1b614ea6c9a2de Author: Nathaniel Shead <nathanielosh...@gmail.com> Date: Fri Oct 4 10:46:57 2024 +1000 c++: Return the underlying decl rather than the USING_DECL from update_binding [PR116913] Users of pushdecl assume that the returned decl will be a possibly updated decl matching the one that was passed in. My r15-3910 change broke this since in some cases we would now return USING_DECLs; this patch fixes the situation. PR c++/116913 gcc/cp/ChangeLog: * name-lookup.cc (update_binding): Return the strip_using'd old decl rather than the binding. gcc/testsuite/ChangeLog: * g++.dg/lookup/using70.C: New test. Signed-off-by: Nathaniel Shead <nathanielosh...@gmail.com>