aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-inline.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-inline.c')
-rw-r--r--gcc/tree-inline.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c
index 060b6e5..8c116f6 100644
--- a/gcc/tree-inline.c
+++ b/gcc/tree-inline.c
@@ -2701,7 +2701,8 @@ setup_one_parameter (copy_body_data *id, tree p, tree value, tree fn,
STRIP_USELESS_TYPE_CONVERSION (rhs);
/* If we are in SSA form properly remap the default definition
- or omit the initialization if the parameter is unused. */
+ or assign to a dummy SSA name if the parameter is unused and
+ we are not optimizing. */
if (gimple_in_ssa_p (cfun) && is_gimple_reg (p))
{
if (def)
@@ -2711,6 +2712,11 @@ setup_one_parameter (copy_body_data *id, tree p, tree value, tree fn,
SSA_NAME_IS_DEFAULT_DEF (def) = 0;
set_default_def (var, NULL);
}
+ else if (!optimize)
+ {
+ def = make_ssa_name (var, NULL);
+ init_stmt = gimple_build_assign (def, rhs);
+ }
}
else
init_stmt = gimple_build_assign (var, rhs);