From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1DF413858C31; Wed, 3 May 2023 14:20:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1DF413858C31 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1683123616; bh=07OMx5B3XXMNmN9XDGC794xDkpj/ghnknlhcJ30aVbU=; h=From:To:Subject:Date:From; b=v4wBdlCpRYS5xH9qFgl19XsTOXWvuLOYjGSb0mlaCOoUpBwETGarAWktHjWPaSPfg OXkgJeqlqjS0tJlZfXDS0vUCvsff6IM0ncAAep0etoNydKgslzbVtEt94aIwCG5tMF tEDctcpQyJMye5a4HzqDYjLoAJRX5zOs/G9rJ4/0= From: "barry.revzin at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/109715] New: abi_tag attribute is not applied to variable templates Date: Wed, 03 May 2023 14:20:15 +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: 12.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: barry.revzin at gmail dot com 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=3D109715 Bug ID: 109715 Summary: abi_tag attribute is not applied to variable templates Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: barry.revzin at gmail dot com Target Milestone: --- Given: template [[gnu::abi_tag("ABI")]] inline int value =3D 0; int get() { return value; } gcc mangles the variable value as _Z5valueIiE, instead of _Z5valueB3ABIIiE. That is, there is no "[abi:ABI]" tag. clang does propagate this attribute as expected. gcc does include the abi_tag in the mangling in other template cases (static data member of a class template, static local variable of a function templa= te, etc.) This is a related (but, I'm guessing, much easier) problem to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D88061.=