aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2010-07-10 01:41:10 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2010-07-09 23:41:10 +0000
commit7e97ee1ae9d7cc479b11c022968d25536b19cfaa (patch)
tree4b667b62c8798dd818156df981977e6d7e330f76
parent0bbe50f6b473e6857777cf9932773accd3cbb0c5 (diff)
downloadgcc-7e97ee1ae9d7cc479b11c022968d25536b19cfaa.zip
gcc-7e97ee1ae9d7cc479b11c022968d25536b19cfaa.tar.gz
gcc-7e97ee1ae9d7cc479b11c022968d25536b19cfaa.tar.bz2
tree-inline.c (declare_return_variable): Fix ICE while inlining DECL_BY_VALUE function not in SSA form
* tree-inline.c (declare_return_variable): Fix ICE while inlining DECL_BY_VALUE function not in SSA form From-SVN: r162024
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/tree-inline.c5
2 files changed, 9 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index afbbb31..af20304 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2010-07-09 Jan Hubicka <jh@suse.cz>
+
+ * tree-inline.c (declare_return_variable): Fix ICE while
+ inlining DECL_BY_VALUE function not in SSA form
+
2010-07-09 Changpeng Fang <changpeng.fang@amd.com>
PR tree-optimization/44576
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c
index 069dcb3..57364e4 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