re PR debug/46252 (-fcompare-debug failure (length) with -O -frerun-cse-after-loop -fno-tree-loop-optimize -funroll-loops)
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. * gcc.dg/pr46252.c: New test. From-SVN: r166232
This commit is contained in:
parent
80ab32d69e
commit
03f43d3d3c
@ -1,5 +1,10 @@
|
||||
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
|
||||
|
@ -3574,7 +3574,7 @@ insert_insn_end_basic_block (struct expr *expr, basic_block bb)
|
||||
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
|
||||
|
@ -2112,7 +2112,7 @@ spill_failure (rtx insn, enum reg_class rclass)
|
||||
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
|
||||
|
@ -1,5 +1,8 @@
|
||||
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
|
||||
|
15
gcc/testsuite/gcc.dg/pr46252.c
Normal file
15
gcc/testsuite/gcc.dg/pr46252.c
Normal file
@ -0,0 +1,15 @@
|
||||
/* 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 ();
|
||||
}
|
Loading…
Reference in New Issue
Block a user