Commit 3cee7e4e by Marek Polacek Committed by Marek Polacek

re PR middle-end/71308 (ICE (segfault) in in gimple_fold_call gimple-fold.c:3060)

	PR middle-end/71308
	* gimple-fold.c (gimple_fold_call): Check that LHS is not null.

	* g++.dg/torture/pr71308.C: New test.

From-SVN: r236815
parent 3168e073
2016-05-27 Marek Polacek <polacek@redhat.com>
PR middle-end/71308
* gimple-fold.c (gimple_fold_call): Check that LHS is not null.
2016-05-27 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
* config/s390/s390.md (2x risbg splitters): Use
......
......@@ -3053,7 +3053,8 @@ gimple_fold_call (gimple_stmt_iterator *gsi, bool inplace)
== void_type_node))
gimple_call_set_fntype (stmt, TREE_TYPE (fndecl));
/* If the call becomes noreturn, remove the lhs. */
if (gimple_call_noreturn_p (stmt)
if (lhs
&& gimple_call_noreturn_p (stmt)
&& (VOID_TYPE_P (TREE_TYPE (gimple_call_fntype (stmt)))
|| should_remove_lhs_p (lhs)))
{
......
2016-05-27 Marek Polacek <polacek@redhat.com>
PR middle-end/71308
* g++.dg/torture/pr71308.C: New test.
2016-05-27 Dominik Vogt <vogt@linux.vnet.ibm.com>
* gcc.dg/zero_bits_compound-1.c: New test.
......
// PR middle-end/71308
// { dg-do compile }
class S
{
void foo ();
virtual void bar () = 0;
virtual ~S ();
};
inline void
S::foo ()
{
bar ();
};
S::~S ()
{
foo ();
}
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