https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94342
--- Comment #10 from Anton ---
I think there are two ways to handle the problem for targets that don't support
COMDAT:
1) issue a diagnostic that the section attribute will be ignored (because it'll
go to .gnu.linkone.*);
2) fallback to weak symb
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94342
--- Comment #8 from Anton ---
Yeah, the generated sections are different yet have the same name. The user
would rely on the static linker to merge the sections into a single one.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94342
--- Comment #6 from Anton ---
I also don't understand why all the parts of a template instantiation need to
be kept in the same COMDAT group. Neither clang nor gcc does it:
template
voi
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94342
--- Comment #5 from Anton ---
Looking at the COMDAT groups for the example with 2 instantiations (Index
and Index), I think this is what is actually expected: section for
Index must not be grouped with section for Index. In general,
different ins
: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: bikineev at google dot com
Target Milestone: ---
GCC ignores the section attribute for static variables declared inside
templates:
template