Patchwork Fix an error in r193053

login
register
mail settings
Submitter Dehao Chen
Date Nov. 1, 2012, 10:25 p.m.
Message ID <CAO2gOZWC1+qgirQy-4NMZQL8UE9XOwkt295mNAkdo7XDDoYtSw@mail.gmail.com>
Download mbox | patch
Permalink /patch/196395/
State New
Headers show

Comments

Dehao Chen - Nov. 1, 2012, 10:25 p.m.
Hi,

In r193053, input_location was mistakenly used. This patch changed to
use curr_insn_location instead. This looks like an obvious patch, can
I check it in to trunk?

Bootstrapped and passed gcc/gdb regression test.

Thanks,
Dehao

gcc/ChangeLog:
2012-11-01  Dehao Chen  <dehao@google.com>

        * expr.c (expand_expr_real_1): Change to not using input_location.
Richard Guenther - Nov. 4, 2012, 5:01 p.m.
On Thu, Nov 1, 2012 at 11:25 PM, Dehao Chen <dehao@google.com> wrote:
> Hi,
>
> In r193053, input_location was mistakenly used. This patch changed to
> use curr_insn_location instead. This looks like an obvious patch, can
> I check it in to trunk?
>
> Bootstrapped and passed gcc/gdb regression test.

Ok.

Thanks,
Richard.

> Thanks,
> Dehao
>
> gcc/ChangeLog:
> 2012-11-01  Dehao Chen  <dehao@google.com>
>
>         * expr.c (expand_expr_real_1): Change to not using input_location.

Patch

Index: gcc/expr.c
===================================================================
--- gcc/expr.c	(revision 193071)
+++ gcc/expr.c	(working copy)
@@ -9221,13 +9221,11 @@  expand_expr_real_1 (tree exp, rtx target, enum mac
       if (g)
 	{
 	  rtx r;
-	  location_t saved_loc = input_location;
+	  location_t saved_loc = curr_insn_location ();
 
-	  input_location = gimple_location (g);
-	  set_curr_insn_location (input_location);
+	  set_curr_insn_location (gimple_location (g));
 	  r = expand_expr_real (gimple_assign_rhs_to_tree (g), target,
 				tmode, modifier, NULL);
-	  input_location = saved_loc;
 	  set_curr_insn_location (saved_loc);
 	  if (REG_P (r) && !REG_EXPR (r))
 	    set_reg_attrs_for_decl_rtl (SSA_NAME_VAR (exp), r);