https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106849
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Nathan Sidwell <nat...@gcc.gnu.org>: https://gcc.gnu.org/g:5b9ecce87e8f315e2681743d75401991cdfefa71 commit r14-5460-g5b9ecce87e8f315e2681743d75401991cdfefa71 Author: Nathaniel Shead <nathanielosh...@gmail.com> Date: Thu Nov 9 19:05:09 2023 -0500 c++: Fix exported using decls of templates We need to look at DECL_TEMPLATE_RESULT to get the module attachment. PR c++/106849 gcc/cp/ChangeLog: * name-lookup.cc (do_nonmember_using_decl): Handle TEMPLATE_DECLs when checking module attachment. gcc/testsuite/ChangeLog: * g++.dg/modules/using-9.C: New test. Signed-off-by: Nathaniel Shead <nathanielosh...@gmail.com> Signed-off-by: Nathan Sidwell <nat...@acm.org>