diff options
author | Jakub Jelinek <jakub@redhat.com> | 2010-06-29 21:46:05 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2010-06-29 21:46:05 +0200 |
commit | 087fa34bad4ee46be9cd53314161239ad75b0743 (patch) | |
tree | 0996b52dea058d9a9d2f2a55d48731a77ba4240f /gcc/cgraph.c | |
parent | 0287000a9f870363bf864354d7cceffc4b575dec (diff) | |
download | gcc-087fa34bad4ee46be9cd53314161239ad75b0743.zip gcc-087fa34bad4ee46be9cd53314161239ad75b0743.tar.gz gcc-087fa34bad4ee46be9cd53314161239ad75b0743.tar.bz2 |
re PR tree-optimization/43801 (error: function causes a section type conflict with -fipa-cp -fipa-cp-clone)
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.
From-SVN: r161564
Diffstat (limited to 'gcc/cgraph.c')
-rw-r--r-- | gcc/cgraph.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/cgraph.c b/gcc/cgraph.c index b63bf31..aaa50b6 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; |