aboutsummaryrefslogtreecommitdiff
path: root/gcc/gcse.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2007-11-18 20:22:35 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2007-11-18 20:22:35 +0100
commit05969da4c37b0c4120a5ac7b7a803f3f98f972af (patch)
tree03f1b2b6d8ba6423f0fa37f78cc5e084bee87a35 /gcc/gcse.c
parent33727b5ecb2653eaa3688a4e9102cb454c1ff6a2 (diff)
downloadgcc-05969da4c37b0c4120a5ac7b7a803f3f98f972af.zip
gcc-05969da4c37b0c4120a5ac7b7a803f3f98f972af.tar.gz
gcc-05969da4c37b0c4120a5ac7b7a803f3f98f972af.tar.bz2
re PR rtl-optimization/34132 (ICE: internal consistency failure (invalid rtl sharing found in the insn))
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. From-SVN: r130275
Diffstat (limited to 'gcc/gcse.c')
-rw-r--r--gcc/gcse.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/gcse.c b/gcc/gcse.c
index c5e8c7b..84c0994 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