re PR middle-end/60419 (ICE Segmentation fault)

2014-03-21  Martin Jambor  <mjambor@suse.cz>

	PR ipa/60419
	* ipa.c (symtab_remove_unreachable_nodes): Clear thunk flag of nodes
	in the border.

testsuite/
	* g++.dg/ipa/pr60419.C: New test.

From-SVN: r208747
This commit is contained in:
Martin Jambor 2014-03-21 13:48:02 +01:00 committed by Martin Jambor
parent 400a4f6ca2
commit d833415cda
4 changed files with 92 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2014-03-21 Martin Jambor <mjambor@suse.cz>
PR ipa/60419
* ipa.c (symtab_remove_unreachable_nodes): Clear thunk flag of nodes
in the border.
2014-03-21 Richard Biener <rguenther@suse.de>
PR tree-optimization/60577

View File

@ -488,6 +488,7 @@ symtab_remove_unreachable_nodes (bool before_inlining_p, FILE *file)
node->definition = false;
node->cpp_implicit_alias = false;
node->alias = false;
node->thunk.thunk_p = false;
node->weakref = false;
if (!node->in_other_partition)
node->local.local = false;

View File

@ -1,3 +1,8 @@
2014-03-21 Martin Jambor <mjambor@suse.cz>
PR ipa/60419
* g++.dg/ipa/pr60419.C: New test.
2014-03-21 Richard Biener <rguenther@suse.de>
PR tree-optimization/60577

View File

@ -0,0 +1,80 @@
// PR middle-end/60419
// { dg-do compile }
// { dg-options "-O2" }
struct C
{
};
struct I : C
{
I ();
};
struct J
{
void foo ();
J ();
virtual void foo (int &, int);
};
template <class>
struct D
{
virtual void foo (I &) const;
void bar ()
{
I p;
foo (p);
}
};
struct K : J, public D<int>
{
};
struct F
{
K *operator->();
};
struct N : public K
{
void foo (int &, int);
I n;
void foo (I &) const {}
};
struct L : J
{
F l;
};
struct M : F
{
L *operator->();
};
struct G
{
G ();
};
M h;
G::G ()
try
{
N f;
f.bar ();
throw;
}
catch (int)
{
}
void
baz ()
{
h->l->bar ();
}