public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/109715] New: abi_tag attribute is not applied to variable templates
@ 2023-05-03 14:20 barry.revzin at gmail dot com
  2023-05-03 16:57 ` [Bug c++/109715] " mpolacek at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: barry.revzin at gmail dot com @ 2023-05-03 14:20 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109715

            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 <class T>
[[gnu::abi_tag("ABI")]] inline int value = 0;

int get() {
    return value<int>;
}

gcc mangles the variable value<int> 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 template,
etc.)

This is a related (but, I'm guessing, much easier) problem to
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88061.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-12-16 17:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-03 14:20 [Bug c++/109715] New: abi_tag attribute is not applied to variable templates barry.revzin at gmail dot com
2023-05-03 16:57 ` [Bug c++/109715] " mpolacek at gcc dot gnu.org
2023-12-15 15:04 ` cvs-commit at gcc dot gnu.org
2023-12-16 17:16 ` ppalka at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).