From e862ffe0e9972049a82bcd0dfb51e0aae9a83606 Mon Sep 17 00:00:00 2001 From: jakub Date: Sun, 18 Nov 2007 19:22:35 +0000 Subject: PR rtl-optimization/34132 * gcse.c (try_replace_reg): Avoid rtx sharing between REG_EQUAL note and insn. * gcc.c-torture/compile/20071118-1.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@130275 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/gcse.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gcc/gcse.c') diff --git a/gcc/gcse.c b/gcc/gcse.c index c5e8c7b44f5..84c0994753d 100644 --- a/gcc/gcse.c +++ b/gcc/gcse.c @@ -2665,7 +2665,8 @@ try_replace_reg (rtx from, rtx to, rtx insn) with our replacement. */ if (note != 0 && REG_NOTE_KIND (note) == REG_EQUAL) set_unique_reg_note (insn, REG_EQUAL, - simplify_replace_rtx (XEXP (note, 0), from, to)); + simplify_replace_rtx (XEXP (note, 0), from, + copy_rtx (to))); if (!success && set && reg_mentioned_p (from, SET_SRC (set))) { /* If above failed and this is a single set, try to simplify the source of -- cgit v1.2.1