This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Properly use input_location in gimplify-expr
- From: Richard Guenther <rguenther at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 18 Jul 2011 16:21:28 +0200 (CEST)
- Subject: [PATCH] Properly use input_location in gimplify-expr
Recent boolifications have introduced exprs with saved_location,
that's bogus.
Committed as obvious.
Richard.
2011-07-18 Richard Guenther <rguenther@suse.de>
* gimplify.c (gimplify_expr): Use input_location, not saved_location
when building new trees.
Index: gcc/gimplify.c
===================================================================
--- gcc/gimplify.c (revision 176397)
+++ gcc/gimplify.c (working copy)
@@ -6773,13 +6773,13 @@ gimplify_expr (tree *expr_p, gimple_seq
source location of the outer expression. */
tree org_type = TREE_TYPE (*expr_p);
*expr_p = gimple_boolify (*expr_p);
- *expr_p = build3_loc (saved_location, COND_EXPR,
+ *expr_p = build3_loc (input_location, COND_EXPR,
org_type, *expr_p,
fold_convert_loc
- (saved_location,
+ (input_location,
org_type, boolean_true_node),
fold_convert_loc
- (saved_location,
+ (input_location,
org_type, boolean_false_node));
ret = GS_OK;
break;
@@ -7229,7 +7236,7 @@ gimplify_expr (tree *expr_p, gimple_seq
*expr_p = gimple_boolify (*expr_p);
if (!useless_type_conversion_p (orig_type, TREE_TYPE (*expr_p)))
{
- *expr_p = fold_convert_loc (saved_location, orig_type, *expr_p);
+ *expr_p = fold_convert_loc (input_location, orig_type, *expr_p);
ret = GS_OK;
break;
}