* reload1.c (delete_dead_insn): Use prev_active_insn instead of
prev_real_insn.
* gcse.c (insert_insn_end_basic_block): Likewise.
* gcc.dg/pr46252.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@166232
138bc75d-0d04-0410-961f-
82ee72b054a4
2010-11-03 Jakub Jelinek <jakub@redhat.com>
+ PR debug/46252
+ * reload1.c (delete_dead_insn): Use prev_active_insn instead of
+ prev_real_insn.
+ * gcse.c (insert_insn_end_basic_block): Likewise.
+
PR rtl-optimization/46034
PR rtl-optimization/46212
PR rtl-optimization/46248
the new instruction just before the tablejump. */
if (GET_CODE (PATTERN (insn)) == ADDR_VEC
|| GET_CODE (PATTERN (insn)) == ADDR_DIFF_VEC)
- insn = prev_real_insn (insn);
+ insn = prev_active_insn (insn);
#ifdef HAVE_cc0
/* FIXME: 'twould be nice to call prev_cc0_setter here but it aborts
static void
delete_dead_insn (rtx insn)
{
- rtx prev = prev_real_insn (insn);
+ rtx prev = prev_active_insn (insn);
rtx prev_dest;
/* If the previous insn sets a register that dies in our insn, delete it
2010-11-03 Jakub Jelinek <jakub@redhat.com>
+ PR debug/46252
+ * gcc.dg/pr46252.c: New test.
+
PR rtl-optimization/46034
PR rtl-optimization/46212
PR rtl-optimization/46248
--- /dev/null
+/* PR debug/46252 */
+/* { dg-do compile } */
+/* { dg-options "-O -frerun-cse-after-loop -fno-tree-loop-optimize -funroll-loops -fcompare-debug" } */
+
+void
+foo (float *f)
+{
+ int i;
+ for (i = 0; i < 4; i++)
+ f[i] = i;
+ bar ();
+ for (i = 0; i < 4; i++)
+ if (f[i] != i)
+ __builtin_abort ();
+}