https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81185
Bug ID: 81185
Summary: Target clones support generates awkward names
Product: gcc
Version: 8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: ipa
Assignee: unassigned at gcc dot gnu.org
Reporter: meissner at gcc dot gnu.org
CC: marxin at gcc dot gnu.org
Target Milestone: ---
The June 19th, 2017 change from Martin Liska <[email protected]>, made the
target_clones support more usable, in that it it changed the external name from
being the default function to being the ifunc handler. This means that calls
from other modules will call the appropriate clone based on what machine it is
running on.
The name generated for each of the clone functions for non-default
architectures has the string ".default.<number>" added to it, while it already
has the various names for the different architectures.
I tracked this down to create_dispatcher_calls getting called for each of the
clone functions, since they have the DECL_FUNCTION_VERISIONED bit set.
We can fix this by either checking whether the function is the default
function, or by having the x86_64 and PowerPC not set DECL_FUNCTION_VERSIONED
for the clone functions.