diff options
Diffstat (limited to 'gcc/tree-inline.c')
-rw-r--r-- | gcc/tree-inline.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c index a710fa5..01a08cf 100644 --- a/gcc/tree-inline.c +++ b/gcc/tree-inline.c @@ -3352,7 +3352,10 @@ insert_init_debug_bind (copy_body_data *id, base_stmt = gsi_stmt (gsi); } - note = gimple_build_debug_bind (tracked_var, unshare_expr (value), base_stmt); + note = gimple_build_debug_bind (tracked_var, + value == error_mark_node + ? NULL_TREE : unshare_expr (value), + base_stmt); if (bb) { @@ -3418,7 +3421,9 @@ force_value_to_type (tree type, tree value) Still if we end up with truly mismatched types here, fall back to using a VIEW_CONVERT_EXPR or a literal zero to not leak invalid GIMPLE to the following passes. */ - if (!is_gimple_reg_type (TREE_TYPE (value)) + if (TREE_CODE (value) == WITH_SIZE_EXPR) + return error_mark_node; + else if (!is_gimple_reg_type (TREE_TYPE (value)) || TYPE_SIZE (type) == TYPE_SIZE (TREE_TYPE (value))) return fold_build1 (VIEW_CONVERT_EXPR, type, value); else @@ -3434,15 +3439,9 @@ setup_one_parameter (copy_body_data *id, tree p, tree value, tree fn, { gimple *init_stmt = NULL; tree var; - tree rhs = value; tree def = (gimple_in_ssa_p (cfun) ? ssa_default_def (id->src_cfun, p) : NULL); - if (value - && value != error_mark_node - && !useless_type_conversion_p (TREE_TYPE (p), TREE_TYPE (value))) - rhs = force_value_to_type (TREE_TYPE (p), value); - /* Make an equivalent VAR_DECL. Note that we must NOT remap the type here since the type of this decl must be visible to the calling function. */ @@ -3501,6 +3500,12 @@ setup_one_parameter (copy_body_data *id, tree p, tree value, tree fn, if (TYPE_NEEDS_CONSTRUCTING (TREE_TYPE (p))) TREE_READONLY (var) = 0; + tree rhs = value; + if (value + && value != error_mark_node + && !useless_type_conversion_p (TREE_TYPE (p), TREE_TYPE (value))) + rhs = force_value_to_type (TREE_TYPE (p), value); + /* If there is no setup required and we are in SSA, take the easy route replacing all SSA names representing the function parameter by the SSA name passed to function. |