re PR ipa/64988 (ICE: verify_cgraph_node failed: Alias and target's comdat groups differs with -fdeclone-ctor-dtor)

PR ipa/64988
	* ipa-inline-transform.c (clone_inlined_nodes): Do not dissolve
	comdat groups.
	* g++.dg/torture/pr64988.C: New testcase.

From-SVN: r221123
This commit is contained in:
Jan Hubicka 2015-03-02 21:10:56 +01:00 committed by Jan Hubicka
parent bc81b5ce9b
commit b91b562cf2
4 changed files with 25 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2015-03-02 Jan Hubicka <hubicka@ucw.cz>
PR ipa/64988
* ipa-inline-transform.c (clone_inlined_nodes): Do not dissolve
comdat groups.
2015-03-02 Jan Hubicka <hubicka@ucw.cz>
Aldy Hernandez <aldyh@redhat.com>

View File

@ -213,7 +213,7 @@ clone_inlined_nodes (struct cgraph_edge *e, bool duplicate,
For now we keep the ohter functions in the group in program until
cgraph_remove_unreachable_functions gets rid of them. */
gcc_assert (!e->callee->global.inlined_to);
e->callee->dissolve_same_comdat_group_list ();
e->callee->remove_from_same_comdat_group ();
if (e->callee->definition
&& inline_account_function_p (e->callee))
{
@ -243,7 +243,7 @@ clone_inlined_nodes (struct cgraph_edge *e, bool duplicate,
}
}
else
e->callee->dissolve_same_comdat_group_list ();
e->callee->remove_from_same_comdat_group ();
e->callee->global.inlined_to = inlining_into;

View File

@ -1,3 +1,8 @@
2015-03-02 Jan Hubicka <hubicka@ucw.cz>
PR ipa/64988
* g++.dg/torture/pr64988.C: New testcase.
2015-03-02 Tobias Burnus <burnus@net-b.de>
* gfortran.dg/coarray_atomic_6.f90: New.

View File

@ -0,0 +1,12 @@
// { dg-do compile }
// { dg-options "-O -fdeclone-ctor-dtor" }
struct A {
virtual ~ A ();
};
struct B : virtual A {};
struct C : virtual A {};
struct D : B, C {};
D d;