From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2E25E3858D38; Tue, 29 Nov 2022 06:44:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2E25E3858D38 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1669704299; bh=K2j0EaQNjeYNPJ+8aUBqpbHZXnMIEnBQMe7QmcLdS0Y=; h=From:To:Subject:Date:From; b=hoKryCmDjNccg9SYdigya69XWW+4NMB29VtsOWnA/qkR73HH3gpWVLL9PT7XXL1Pj eY/QEgyw6IGhN9LVhurum6ryY2LtmCHKC7eo1/WLmWFr8B4ZDYgv2NTKb0RAm0wrQt dUJAHM5WStHIlfC+F4Pt6DQzUwoya7fOru52lkgw= From: "herring at lanl dot gov" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/107906] New: Function template specialization given weak rather than local symbol Date: Tue, 29 Nov 2022 06:44:58 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: herring at lanl dot gov X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107906 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 template using X=3Dint; namespace { template using Y=3Dint; } template class Q> void f() {} template void f(); void (*fp)()=3Df; 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).=