aboutsummaryrefslogtreecommitdiff
path: root/gcc/combine.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2008-12-03 08:40:50 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2008-12-03 08:40:50 +0000
commit0ce2b2991c6cef3d65055cc06ad76aeffb3587a3 (patch)
tree8997fcdef589e56a8ca3d3a251a0bc0305892e4b /gcc/combine.c
parent396315d951e6e0743fa9a55e9f8933e7fb5d1352 (diff)
downloadgcc-0ce2b2991c6cef3d65055cc06ad76aeffb3587a3.zip
gcc-0ce2b2991c6cef3d65055cc06ad76aeffb3587a3.tar.gz
gcc-0ce2b2991c6cef3d65055cc06ad76aeffb3587a3.tar.bz2
re PR rtl-optimization/38281 (segmentation fault with optimization enabled)
PR rtl-optimization/38281 * combine.c (distribute_notes): When invoking SET_INSN_DELETED on i2, set it to NULL_RTX afterwards. * emit-rtl.c (set_insn_deleted): Fix formatting. Co-Authored-By: Andrew Pinski <andrew_pinski@playstation.sony.com> Co-Authored-By: Jakub Jelinek <jakub@redhat.com> From-SVN: r142388
Diffstat (limited to 'gcc/combine.c')
-rw-r--r--gcc/combine.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/combine.c b/gcc/combine.c
index b8a4335..d6f7480 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -12653,6 +12653,8 @@ distribute_notes (rtx notes, rtx from_insn, rtx i3, rtx i2, rtx elim_i2,
distribute_links (LOG_LINKS (tem));
SET_INSN_DELETED (tem);
+ if (tem == i2)
+ i2 = NULL_RTX;
#ifdef HAVE_cc0
/* Delete the setter too. */
@@ -12668,6 +12670,8 @@ distribute_notes (rtx notes, rtx from_insn, rtx i3, rtx i2, rtx elim_i2,
distribute_links (LOG_LINKS (cc0_setter));
SET_INSN_DELETED (cc0_setter);
+ if (cc0_setter == i2)
+ i2 = NULL_RTX;
}
#endif
}