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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |INVALID

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Yes this is the correct behavior for this attribute.

https://gcc.gnu.org/onlinedocs/gcc-12.2.0/gcc/Common-Function-Attributes.html#index-target_005fclones-function-attribute

"It also creates a resolver function (see the ifunc attribute above) that
dynamically selects a clone suitable for current architecture. The resolver is
created only if there is a usage of a function with target_clones attribute.
"

This has been this way since target_clones support was added in GCC 6:
r6-4443-g3b1661a9b93fe8 .

Looks like it was not implemented the same way in clang, report it to them.

Reply via email to