Commit 11321111 by Alexandre Oliva Committed by Alexandre Oliva

re PR debug/46782 (-fcompare-debug failure (length) with -fvar-tracking)

gcc/ChangeLog:
PR debug/46782
* cfgcleanup.c (try_forward_edges): Skip debug insns.
gcc/testsuite/ChangeLog:
PR debug/46782
* gcc.dg/debug/pr46782.c: New.

From-SVN: r167737
parent 6930a9f6
2010-12-13 Alexandre Oliva <aoliva@redhat.com>
PR debug/46782
* cfgcleanup.c (try_forward_edges): Skip debug insns.
2010-12-12 Jan Hubicka <jh@suse.cz>
Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
......@@ -487,11 +487,17 @@ try_forward_edges (int mode, basic_block b)
new_target = NULL;
else
{
rtx last;
if (new_locus)
locus = new_locus;
new_locus = INSN_P (BB_END (target))
? INSN_LOCATOR (BB_END (target)) : 0;
last = BB_END (target);
if (DEBUG_INSN_P (last))
last = prev_nondebug_insn (last);
new_locus = last && INSN_P (last)
? INSN_LOCATOR (last) : 0;
if (new_locus && locus && !locator_eq (new_locus, locus))
new_target = NULL;
......
2010-12-13 Alexandre Oliva <aoliva@redhat.com>
PR debug/46782
* gcc.dg/debug/pr46782.c: New.
2010-12-12 Janus Weil <janus@gcc.gnu.org>
PR fortran/46809
......
/* PR debug/46782 */
/* { dg-do compile } */
/* { dg-options "-w -O0 -fvar-tracking -fcompare-debug" } */
void foo (int i)
{
if (i)
i++;
while (i)
;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment