From 1cf4526c73887daecfdf725b6bbdd3d25b5517c2 Mon Sep 17 00:00:00 2001 From: Sandra Loosemore Date: Sun, 11 Dec 2016 20:06:30 -0500 Subject: [PATCH] nios2.c (nios2_emit_move_sequence): Call copy_rtx to avoid shared structure error. 2016-12-11 Sandra Loosemore gcc/ * config/nios2/nios2.c (nios2_emit_move_sequence): Call copy_rtx to avoid shared structure error. From-SVN: r243538 --- gcc/ChangeLog | 5 +++++ gcc/config/nios2/nios2.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b6a058bf449..d0d4001c0c4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2016-12-11 Sandra Loosemore + + * config/nios2/nios2.c (nios2_emit_move_sequence): Call copy_rtx + to avoid shared structure error. + 2016-12-11 Bill Schmidt PR target/78695 diff --git a/gcc/config/nios2/nios2.c b/gcc/config/nios2/nios2.c index cb4544c544b..a6d7d4351d7 100644 --- a/gcc/config/nios2/nios2.c +++ b/gcc/config/nios2/nios2.c @@ -2334,7 +2334,8 @@ nios2_emit_move_sequence (rtx *operands, machine_mode mode) from = nios2_legitimize_constant_address (from); if (CONSTANT_P (from)) { - emit_insn (gen_rtx_SET (to, gen_rtx_HIGH (Pmode, from))); + emit_insn (gen_rtx_SET (to, + gen_rtx_HIGH (Pmode, copy_rtx (from)))); emit_insn (gen_rtx_SET (to, gen_rtx_LO_SUM (Pmode, to, from))); set_unique_reg_note (get_last_insn (), REG_EQUAL, copy_rtx (operands[1])); -- 2.30.2