https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104539
--- Comment #3 from Jason Merrill <jason at gcc dot gnu.org> --- (In reply to Richard Biener from comment #2) > the explicit instantiation lacks COMDAT (but has comdat_group) and it > has forced_by_abi. > > I'm not sure the C++ standard calls out any semantic difference for > explicit vs. implicit instantiations but maybe the Itanium ABI does. The ABI says nothing about explicit vs. implicit instantiations. mark_decl_instantiated cleared DECL_COMDAT to fix PR10968, where we failed to emit an explicit instantiation. But that was before mark_needed; now that we have that, I'd think it makes sense to have DECL_COMDAT set on explicit instantiations just like implicit ones.