[PATCH] Use !implicit_section in the recent set_section change (PR ipa/65087)
Jakub Jelinek
jakub@redhat.com
Tue Feb 17 20:47:00 GMT 2015
Hi!
Markus reported an ICE, that is fixed by following patch, which limits
the earlier change to !implicit_section only (which I assume is the user
supplied __attribute__((section ()))).
Bootstrapped/regtested on {x86_64,i686,aarch64,ppc64,ppc64le,s390,s390x}-linux.
Ok for trunk?
2015-02-17 Jakub Jelinek <jakub@redhat.com>
PR ipa/65087
* cgraphclones.c (cgraph_node::create_virtual_clone): Only copy
section if !implicit_section.
(cgraph_node::create_version_clone_with_body): Likewise.
* trans-mem.c (ipa_tm_create_version): Likewise.
--- gcc/cgraphclones.c.jj 2015-02-16 20:16:43.000000000 +0100
+++ gcc/cgraphclones.c 2015-02-17 09:35:19.682184215 +0100
@@ -617,7 +617,7 @@ cgraph_node::create_virtual_clone (vec<c
ABI support for this. */
set_new_clone_decl_and_node_flags (new_node);
new_node->clone.tree_map = tree_map;
- if (!DECL_ONE_ONLY (old_decl))
+ if (!implicit_section)
new_node->set_section (get_section ());
/* Clones of global symbols or symbols with unique names are unique. */
@@ -1011,7 +1011,8 @@ cgraph_node::create_version_clone_with_b
new_version_node->externally_visible = 0;
new_version_node->local.local = 1;
new_version_node->lowered = true;
- new_version_node->set_section (get_section ());
+ if (!implicit_section)
+ new_version_node->set_section (get_section ());
/* Clones of global symbols or symbols with unique names are unique. */
if ((TREE_PUBLIC (old_decl)
&& !DECL_EXTERNAL (old_decl)
--- gcc/trans-mem.c.jj 2015-02-16 20:16:43.000000000 +0100
+++ gcc/trans-mem.c 2015-02-17 09:35:19.682184215 +0100
@@ -4967,7 +4967,8 @@ ipa_tm_create_version (struct cgraph_nod
new_node->externally_visible = old_node->externally_visible;
new_node->lowered = true;
new_node->tm_clone = 1;
- new_node->set_section (old_node->get_section ());
+ if (!old_node->implicit_section)
+ new_node->set_section (old_node->get_section ());
get_cg_data (&old_node, true)->clone = new_node;
if (old_node->get_availability () >= AVAIL_INTERPOSABLE)
Jakub
More information about the Gcc-patches
mailing list