https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116184
Patrick Palka <ppalka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Last reconfirmed| |2025-10-30
Status|UNCONFIRMED |NEW
CC| |jason at gcc dot gnu.org
--- Comment #7 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Probably related:
void f() {
[[gnu::used, gnu::section(".test")]] static int p;
}
inline void g() {
[[gnu::used, gnu::section(".test")]] static int p;
}
int main() {
f();
g();
}
is rejected with
<stdin>:6:51: error: ‘p’ causes a section type conflict with ‘p’
<stdin>:2:51: note: ‘p’ was declared here
Jason hinted at a solution back in 2019:
https://gcc.gnu.org/legacy-ml/gcc-patches/2019-12/msg01152.html