diff options
author | Jakub Jelinek <jakub@redhat.com> | 2007-11-18 20:22:35 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2007-11-18 20:22:35 +0100 |
commit | 05969da4c37b0c4120a5ac7b7a803f3f98f972af (patch) | |
tree | 03f1b2b6d8ba6423f0fa37f78cc5e084bee87a35 /gcc/gcse.c | |
parent | 33727b5ecb2653eaa3688a4e9102cb454c1ff6a2 (diff) | |
download | gcc-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.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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 |