https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107906
Bug ID: 107906
Summary: Function template specialization given weak rather
than local symbol
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: herring at lanl dot gov
Target Milestone: ---
Current trunk, given <https://godbolt.org/z/aoMecfhqb>
template<class> using X=int;
namespace {
template<class> using Y=int;
}
template<template<class> class Q> void f() {}
template void f<X>();
void (*fp)()=f<Y>;
emits weak symbols for both specializations of f, despite the fact that a
different "void f<(anonymous namespace)::Y>()" might be defined in another
translation unit (perhaps as an explicit specialization).