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

Corey Tabaka <eieio at google dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |eieio at google dot com

--- Comment #11 from Corey Tabaka <eieio at google dot com> ---
Clang already (In reply to Jakub Jelinek from comment #9)
> COMDAT is implemented in different ways.  If it is through the ELF comdat
> groups, then in theory this can be handled, by putting the COMDAT variable
> (from template instantiation, or inline variable, static var in inline
> function etc.) into the section with the given name and use the comdat group
> we would normally use.
> If ELF comdat groups aren't supported, then we use .gnu.linkonce.* sections
> and in that case it can't be really supported.  Nor in the non-ELF cases...

Clang already takes the approach of applying the given section name and using
the normal COMDAT group for ELF targets. It would be helpful for GCC and Clang
to match behaviors.

Example: https://godbolt.org/z/w-Hy-z

Reply via email to