https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98687
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Marek Polacek <mpola...@gcc.gnu.org>: https://gcc.gnu.org/g:d89b00c095e99cd5cb6d3e05f30d3a61fa592000 commit r11-6802-gd89b00c095e99cd5cb6d3e05f30d3a61fa592000 Author: Marek Polacek <pola...@redhat.com> Date: Thu Jan 14 22:14:38 2021 -0500 c++: ICE with USING_DECL redeclaration [PR98687] My recent patch that introduced push_using_decl_bindings didn't handle USING_DECL redeclaration, therefore things broke. This patch amends that by breaking out a part of finish_nonmember_using_decl out to a separate function, push_using_decl_bindings, and calling it. It needs an overload, because name_lookup is only available inside of name-lookup.c. gcc/cp/ChangeLog: PR c++/98687 * name-lookup.c (push_using_decl_bindings): New, broken out of... (finish_nonmember_using_decl): ...here. * name-lookup.h (push_using_decl_bindings): Update declaration. * pt.c (tsubst_expr): Update the call to push_using_decl_bindings. gcc/testsuite/ChangeLog: PR c++/98687 * g++.dg/lookup/using64.C: New test. * g++.dg/lookup/using65.C: New test.