From 0fbac2d130600a37414c33ecf2c12c9c8945f353 Mon Sep 17 00:00:00 2001 From: Bernd Edlinger Date: Tue, 27 Sep 2016 04:54:49 +0000 Subject: [PATCH] re PR rtl-optimization/77714 (Wrong code generation for gcc.c-torture/execute/pr51447.c) 2016-09-27 Bernd Edlinger PR rlt-optimization/77714 * lra-eliminations.c (eliminate_regs_in_insn): Avoid alias on REG_EQUAL note. From-SVN: r240518 --- gcc/ChangeLog | 6 ++++++ gcc/lra-eliminations.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3e5b0994eae..fa647886249 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2016-09-27 Bernd Edlinger + + PR rlt-optimization/77714 + * lra-eliminations.c (eliminate_regs_in_insn): Avoid alias on + REG_EQUAL note. + 2016-09-27 Kugan Vivekanandarajah PR ipa/77677 diff --git a/gcc/lra-eliminations.c b/gcc/lra-eliminations.c index 1764bd699ce..03b315e7199 100644 --- a/gcc/lra-eliminations.c +++ b/gcc/lra-eliminations.c @@ -981,7 +981,7 @@ eliminate_regs_in_insn (rtx_insn *insn, bool replace_p, bool first_p, } lra_update_insn_recog_data (insn); /* Add offset note for future updates. */ - add_reg_note (insn, REG_EQUAL, src); + add_reg_note (insn, REG_EQUAL, copy_rtx (src)); return; } } -- 2.30.2