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
* [Bug c++/109715] abi_tag attribute is not applied to variable templates
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 ` 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
2 siblings, 0 replies; 4+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2023-05-03 16:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109715
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mpolacek at gcc dot gnu.org
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
Last reconfirmed| |2023-05-03
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/109715] abi_tag attribute is not applied to variable templates
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
2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-12-15 15:04 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109715
--- Comment #1 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Patrick Palka <ppalka@gcc.gnu.org>:
https://gcc.gnu.org/g:46984fa259436ad50afb50a46a0a16e83bdf7172
commit r14-6594-g46984fa259436ad50afb50a46a0a16e83bdf7172
Author: Patrick Palka <ppalka@redhat.com>
Date: Fri Dec 15 10:03:26 2023 -0500
c++: abi_tag attribute on templates [PR109715]
We need to look through TEMPLATE_DECL when looking up the abi_tag
attribute (as with other function/variable declaration attributes).
PR c++/109715
gcc/cp/ChangeLog:
* mangle.cc (get_abi_tags): Strip TEMPLATE_DECL before looking
up the abi_tag attribute.
gcc/testsuite/ChangeLog:
* g++.dg/abi/abi-tag25.C: New test.
* g++.dg/abi/abi-tag25a.C: New test.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/109715] abi_tag attribute is not applied to variable templates
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
2 siblings, 0 replies; 4+ messages in thread
From: ppalka at gcc dot gnu.org @ 2023-12-16 17:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109715
Patrick Palka <ppalka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ppalka at gcc dot gnu.org
Resolution|--- |FIXED
Assignee|unassigned at gcc dot gnu.org |ppalka at gcc dot gnu.org
Status|NEW |RESOLVED
Target Milestone|--- |14.0
--- Comment #2 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Fixed for GCC 14
^ 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).