The new insn here (temporarily) illegally shares RTL.  This fixes it.

Tested with an ARC cross, and regstrapped on powerpc64-linux {-m32,-m64}.
Is this okay for trunk?


Segher


2018-12-12  Segher Boessenkool  <seg...@kernel.crashing.org>

        PR rtl-optimization/88001
        * function.c (match_asm_constraints_1): Don't invalidly share RTL.

---
 gcc/function.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/function.c b/gcc/function.c
index 69523c1..60e96f3 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -6529,7 +6529,7 @@ match_asm_constraints_1 (rtx_insn *insn, rtx *p_sets, int 
noutputs)
       output_matched[match] = true;
 
       start_sequence ();
-      emit_move_insn (output, input);
+      emit_move_insn (output, copy_rtx (input));
       insns = get_insns ();
       end_sequence ();
       emit_insn_before (insns, insn);
-- 
1.8.3.1

Reply via email to