summaryrefslogtreecommitdiff
path: root/gcc/cgraph.c
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2010-06-29 19:46:05 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2010-06-29 19:46:05 +0000
commit931b69dd5fb816b3b85885a978fd1ca141c57ec0 (patch)
tree0996b52dea058d9a9d2f2a55d48731a77ba4240f /gcc/cgraph.c
parent6a9f3fe9c5fc1ae2c12dfac96ec6eb6f792dd3bd (diff)
downloadgcc-931b69dd5fb816b3b85885a978fd1ca141c57ec0.tar.gz
PR tree-optimization/43801
* cgraph.c (cgraph_create_virtual_clone): Clear DECL_SECTION_NAME if old_decl was DECL_ONE_ONLY. * g++.dg/torture/pr43801.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@161564 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cgraph.c')
-rw-r--r--gcc/cgraph.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/cgraph.c b/gcc/cgraph.c
index b63bf314a12..aaa50b607d2 100644
--- a/gcc/cgraph.c
+++ b/gcc/cgraph.c
@@ -2217,6 +2217,8 @@ cgraph_create_virtual_clone (struct cgraph_node *old_node,
??? We cannot use COMDAT linkage because there is no
ABI support for this. */
DECL_EXTERNAL (new_node->decl) = 0;
+ if (DECL_ONE_ONLY (old_decl))
+ DECL_SECTION_NAME (new_node->decl) = NULL;
DECL_COMDAT_GROUP (new_node->decl) = 0;
TREE_PUBLIC (new_node->decl) = 0;
DECL_COMDAT (new_node->decl) = 0;