diff options
author | Martin Liska <mliska@suse.cz> | 2021-08-12 16:01:01 +0200 |
---|---|---|
committer | Martin Liska <mliska@suse.cz> | 2021-08-16 09:53:41 +0200 |
commit | 91292490d573f9f9e4f162d6d8c693a969197f2d (patch) | |
tree | 3b8569b901d25ad6139c6b6040c871a78c77a9f0 /gcc | |
parent | b0de3ad2620d665ab481c2f24204f77f386ff6b2 (diff) | |
download | gcc-91292490d573f9f9e4f162d6d8c693a969197f2d.zip gcc-91292490d573f9f9e4f162d6d8c693a969197f2d.tar.gz gcc-91292490d573f9f9e4f162d6d8c693a969197f2d.tar.bz2 |
ipa: make target_clone default decl local [PR101726]
PR ipa/101726
gcc/ChangeLog:
* multiple_target.c (create_dispatcher_calls): Make default
function local only if it is a definition.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/multiple_target.c | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/gcc/multiple_target.c b/gcc/multiple_target.c index e419265..6c05658 100644 --- a/gcc/multiple_target.c +++ b/gcc/multiple_target.c @@ -170,17 +170,20 @@ create_dispatcher_calls (struct cgraph_node *node) clone_function_name_numbered ( node->decl, "default")); - /* FIXME: copy of cgraph_node::make_local that should be cleaned up - in next stage1. */ - node->make_decl_local (); - node->set_section (NULL); - node->set_comdat_group (NULL); - node->externally_visible = false; - node->forced_by_abi = false; - node->set_section (NULL); - - DECL_ARTIFICIAL (node->decl) = 1; - node->force_output = true; + if (node->definition) + { + /* FIXME: copy of cgraph_node::make_local that should be cleaned up + in next stage1. */ + node->make_decl_local (); + node->set_section (NULL); + node->set_comdat_group (NULL); + node->externally_visible = false; + node->forced_by_abi = false; + node->set_section (NULL); + + DECL_ARTIFICIAL (node->decl) = 1; + node->force_output = true; + } } /* Return length of attribute names string, |