Commit f173837a by Eric Botcazou Committed by Eric Botcazou

gimplify.c (gimplify_modify_expr): During gimplification...

	* gimplify.c (gimplify_modify_expr): During gimplification, attach a
	DECL on the rhs to a DECL on the lhs for debug info purposes if the
	former is ignored but not the latter.

From-SVN: r122015
parent befdad07
2007-02-15 Eric Botcazou <ebotcazou@adacore.com>
* gimplify.c (gimplify_modify_expr): During gimplification, attach a
DECL on the rhs to a DECL on the lhs for debug info purposes if the
former is ignored but not the latter.
2007-02-15 Eric Botcazou <ebotcazou@adacore.com>
* expr.c (expand_expr_real_1) <normal_inner_ref>: If a temporary
is made and the reference doesn't use the alias set of its type,
do not create the temporary using that type.
......
......@@ -3654,6 +3654,19 @@ gimplify_modify_expr (tree *expr_p, tree *pre_p, tree *post_p, bool want_value)
*to_p = make_ssa_name (*to_p, *expr_p);
}
/* Try to alleviate the effects of the gimplification creating artificial
temporaries (see for example is_gimple_reg_rhs) on the debug info. */
if (!gimplify_ctxp->into_ssa
&& DECL_P (*from_p) && DECL_IGNORED_P (*from_p)
&& DECL_P (*to_p) && !DECL_IGNORED_P (*to_p))
{
if (!DECL_NAME (*from_p) && DECL_NAME (*to_p))
DECL_NAME (*from_p)
= create_tmp_var_name (IDENTIFIER_POINTER (DECL_NAME (*to_p)));
DECL_DEBUG_EXPR_IS_FROM (*from_p) = 1;
SET_DECL_DEBUG_EXPR (*from_p, *to_p);
}
if (want_value)
{
tree_to_gimple_tuple (expr_p);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment