tree-inline.c (expand_call_inline): Fix path dealing with making lhs of call statement undefined.

* tree-inline.c (expand_call_inline): Fix path dealing with
	making lhs of call statement undefined.

From-SVN: r235889
This commit is contained in:
Jan Hubicka 2016-05-04 18:42:12 +02:00 committed by Jan Hubicka
parent 6b715bf6d9
commit 693a9117d0
2 changed files with 11 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2016-05-04 Jan Hubicka <hubicka@ucw.cz>
* tree-inline.c (expand_call_inline): Fix path dealing with
making lhs of call statement undefined.
2016-05-04 Jan Hubicka <hubicka@ucw.cz>
* cgraph.c (cgraph_node::call_for_symbol_thunks_and_aliases):

View file

@ -4708,7 +4708,7 @@ expand_call_inline (basic_block bb, gimple *stmt, copy_body_data *id)
{
tree name = gimple_call_lhs (stmt);
tree var = SSA_NAME_VAR (name);
tree def = ssa_default_def (cfun, var);
tree def = var ? ssa_default_def (cfun, var) : NULL;
if (def)
{
@ -4719,6 +4719,11 @@ expand_call_inline (basic_block bb, gimple *stmt, copy_body_data *id)
}
else
{
if (!var)
{
tree var = create_tmp_reg_fn (cfun, TREE_TYPE (name), NULL);
SET_SSA_NAME_VAR_OR_IDENTIFIER (name, var);
}
/* Otherwise make this variable undefined. */
gsi_remove (&stmt_gsi, true);
set_ssa_default_def (cfun, var, name);