Commit 960db8ec by Jakub Jelinek Committed by Jakub Jelinek

re PR c++/71100 (Internal compiler error while calling a pointer to member function that throws)

	PR c++/71100
	* cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Don't drop
	lhs if it has TREE_ADDRESSABLE type.

	* g++.dg/opt/pr71100.C: New test.

From-SVN: r236430
parent 78885314
2016-05-18 Jakub Jelinek <jakub@redhat.com>
PR c++/71100
* cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Don't drop
lhs if it has TREE_ADDRESSABLE type.
2016-05-18 Uros Bizjak <ubizjak@gmail.com>
PR target/71145
......
......@@ -1515,7 +1515,8 @@ cgraph_edge::redirect_call_stmt_to_callee (void)
/* If the call becomes noreturn, remove the LHS if possible. */
if (lhs
&& (gimple_call_flags (new_stmt) & ECF_NORETURN)
&& TREE_CODE (TYPE_SIZE_UNIT (TREE_TYPE (lhs))) == INTEGER_CST)
&& TREE_CODE (TYPE_SIZE_UNIT (TREE_TYPE (lhs))) == INTEGER_CST
&& !TREE_ADDRESSABLE (TREE_TYPE (lhs)))
{
if (TREE_CODE (lhs) == SSA_NAME)
{
......
2016-05-18 Jakub Jelinek <jakub@redhat.com>
PR c++/71100
* g++.dg/opt/pr71100.C: New test.
2016-05-18 Martin Jambor <mjambor@suse.cz>
PR ipa/69708
......
// PR c++/71100
// { dg-do compile }
// { dg-options "-O2" }
struct D { ~D (); };
struct E { D foo () { throw 1; } };
inline void
bar (D (E::*f) (), E *o)
{
(o->*f) ();
}
void
baz (E *o)
{
bar (&E::foo, o);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment