diff options
author | Alexandre Oliva <aoliva@redhat.com> | 2010-12-13 03:08:06 +0000 |
---|---|---|
committer | Alexandre Oliva <aoliva@redhat.com> | 2010-12-13 03:08:06 +0000 |
commit | ea4f014e24896e1ee9d2e1571f7b1f92b91efae0 (patch) | |
tree | 9003b88e1c055be42fd5dbdcc718b461c42629c0 /gcc/cfgcleanup.c | |
parent | 07526dca0a21cdb1161f0a7cfb9c1f96fe889233 (diff) |
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.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@167737 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cfgcleanup.c')
-rw-r--r-- | gcc/cfgcleanup.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/cfgcleanup.c b/gcc/cfgcleanup.c index c365b5e8a2d..78635d23a55 100644 --- a/gcc/cfgcleanup.c +++ b/gcc/cfgcleanup.c @@ -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; |