From: Jan Hubicka Date: Wed, 4 May 2016 16:42:12 +0000 (+0200) Subject: tree-inline.c (expand_call_inline): Fix path dealing with making lhs of call statemen... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=693a9117d0f26a4a7ee07783ac3971641429b03b;p=gcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d3d54ec82a5..92da7b52538 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2016-05-04 Jan Hubicka + + * tree-inline.c (expand_call_inline): Fix path dealing with + making lhs of call statement undefined. + 2016-05-04 Jan Hubicka * cgraph.c (cgraph_node::call_for_symbol_thunks_and_aliases): diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c index 19f202e5371..da233b29c4f 100644 --- a/gcc/tree-inline.c +++ b/gcc/tree-inline.c @@ -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);