diff options
author | Patrick Palka <ppalka@redhat.com> | 2023-12-15 10:03:31 -0500 |
---|---|---|
committer | Patrick Palka <ppalka@redhat.com> | 2023-12-15 10:03:31 -0500 |
commit | ea7bebff7cc5a5eb780a6ca646cb77cad1b625d6 (patch) | |
tree | 4b7cecb855de3516bd3c66df5f35523a599379be /libphobos | |
parent | 46984fa259436ad50afb50a46a0a16e83bdf7172 (diff) | |
download | gcc-ea7bebff7cc5a5eb780a6ca646cb77cad1b625d6.zip gcc-ea7bebff7cc5a5eb780a6ca646cb77cad1b625d6.tar.gz gcc-ea7bebff7cc5a5eb780a6ca646cb77cad1b625d6.tar.bz2 |
c++: section attribute on templates [PR70435, PR88061]
The section attribute currently has no effect on templates because the
call to set_decl_section_name only happens at parse time (on the
dependent decl) and not also at instantiation time. This patch fixes
this by propagating the section name from the template to the
instantiation.
PR c++/70435
PR c++/88061
gcc/cp/ChangeLog:
* pt.cc (tsubst_function_decl): Propagate DECL_SECTION_NAME
via set_decl_section_name.
(tsubst_decl) <case VAR_DECL>: Likewise.
gcc/testsuite/ChangeLog:
* g++.dg/ext/attr-section1.C: New test.
* g++.dg/ext/attr-section1a.C: New test.
* g++.dg/ext/attr-section2.C: New test.
* g++.dg/ext/attr-section2a.C: New test.
* g++.dg/ext/attr-section2b.C: New test.
Diffstat (limited to 'libphobos')
0 files changed, 0 insertions, 0 deletions