diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-07-09 23:41:10 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-07-09 23:41:10 +0000 |
commit | 883fe359862dfc9b4a7971ff9cc7435d972419a6 (patch) | |
tree | 4b667b62c8798dd818156df981977e6d7e330f76 /gcc/tree-inline.c | |
parent | 76595608131ec929f1e9cd5e5935d99fb4dac342 (diff) | |
download | gcc-883fe359862dfc9b4a7971ff9cc7435d972419a6.tar.gz |
* tree-inline.c (declare_return_variable): Fix ICE while
inlining DECL_BY_VALUE function not in SSA form
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@162024 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-inline.c')
-rw-r--r-- | gcc/tree-inline.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c index 069dcb3006d..57364e43721 100644 --- a/gcc/tree-inline.c +++ b/gcc/tree-inline.c @@ -2903,7 +2903,10 @@ declare_return_variable (copy_body_data *id, tree return_slot, tree modify_dest, add_referenced_var (temp); } insert_decl_map (id, result, temp); - temp = remap_ssa_name (gimple_default_def (id->src_cfun, result), id); + /* When RESULT_DECL is in SSA form, we need to use it's default_def + SSA_NAME. */ + if (gimple_in_ssa_p (id->src_cfun) && gimple_default_def (id->src_cfun, result)) + temp = remap_ssa_name (gimple_default_def (id->src_cfun, result), id); insert_init_stmt (id, entry_bb, gimple_build_assign (temp, var)); } else |