https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122819
--- Comment #1 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Nathaniel Shead <[email protected]>: https://gcc.gnu.org/g:cf22e30f0cfae65dd012966cab657583e2be667e commit r16-5977-gcf22e30f0cfae65dd012966cab657583e2be667e Author: Nathaniel Shead <[email protected]> Date: Sun Dec 7 23:17:15 2025 +1100 c++: Non-inline temploid friends should still be COMDAT [PR122819] Modules allow temploid friends to no longer be implicitly inline, as functions defined in a class body will not be implicitly inline if attached to a named module. This requires us to clean up linkage handling a little bit, mostly by replacing usages of 'DECL_TEMPLATE_INSTANTIATION' with 'DECL_TEMPLOID_INSTANTIATION' when determining if an entity has vague linkage. PR c++/122819 gcc/cp/ChangeLog: * decl.cc (start_preparsed_function): Use DECL_TEMPLOID_INSTANTIATION instead of DECL_TEMPLATE_INSTANTIATION to check vague linkage. * decl2.cc (vague_linkage_p): Likewise. (c_parse_final_cleanups): Simplify condition. * semantics.cc (expand_or_defer_fn_1): Also check for temploid friend functions. gcc/testsuite/ChangeLog: * g++.dg/modules/tpl-friend-22.C: New test. Signed-off-by: Nathaniel Shead <[email protected]> Reviewed-by: Jason Merrill <[email protected]>
