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
This commit is contained in:
parent
0287000a9f
commit
087fa34bad
@ -1,5 +1,9 @@
|
||||
2010-06-29 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR tree-optimization/43801
|
||||
* cgraph.c (cgraph_create_virtual_clone): Clear DECL_SECTION_NAME
|
||||
if old_decl was DECL_ONE_ONLY.
|
||||
|
||||
PR debug/44668
|
||||
* dwarf2out.c (add_accessibility_attribute): New function.
|
||||
(gen_subprogram_die, gen_variable_die, gen_field_die): Use it
|
||||
|
@ -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;
|
||||
|
@ -1,5 +1,8 @@
|
||||
2010-06-29 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR tree-optimization/43801
|
||||
* g++.dg/torture/pr43801.C: New test.
|
||||
|
||||
PR debug/44668
|
||||
* g++.dg/debug/dwarf2/accessibility1.C: New test.
|
||||
|
||||
|
22
gcc/testsuite/g++.dg/torture/pr43801.C
Normal file
22
gcc/testsuite/g++.dg/torture/pr43801.C
Normal file
@ -0,0 +1,22 @@
|
||||
// PR tree-optimization/43801
|
||||
// { dg-do compile }
|
||||
// { dg-options "-fipa-cp -fipa-cp-clone" }
|
||||
|
||||
struct A
|
||||
{
|
||||
virtual void f (int);
|
||||
};
|
||||
struct B : virtual A
|
||||
{
|
||||
virtual void f (int i) { if (i) A::f(0); }
|
||||
};
|
||||
struct C : virtual B
|
||||
{
|
||||
virtual void f (int) { B::f(0); }
|
||||
};
|
||||
|
||||
void
|
||||
foo ()
|
||||
{
|
||||
C ();
|
||||
}
|
Loading…
Reference in New Issue
Block a user