diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-11-23 15:16:43 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-11-23 15:16:43 +0000 |
commit | 2755d767d69c9b9df7fc3fa3e43431193be7888b (patch) | |
tree | 95d45f0b7a3cd58a3cc14a87016b385e22d8eeaf /gcc/cfgexpand.c | |
parent | dd5fed3c0420569bf8e650bb94625242d3e23b1e (diff) | |
download | gcc-2755d767d69c9b9df7fc3fa3e43431193be7888b.tar.gz |
PR middle-end/46499
* cfgexpand.c (maybe_cleanup_end_of_block): Remove also BARRIERs
following unconditional jumps.
* gcc.dg/pr46499-1.c: New test.
* gcc.dg/pr46499-2.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@167082 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cfgexpand.c')
-rw-r--r-- | gcc/cfgexpand.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c index 784639d9e65..a65f12ba490 100644 --- a/gcc/cfgexpand.c +++ b/gcc/cfgexpand.c @@ -1694,7 +1694,14 @@ maybe_cleanup_end_of_block (edge e, rtx last) { insn = PREV_INSN (insn); if (JUMP_P (NEXT_INSN (insn))) - delete_insn (NEXT_INSN (insn)); + { + if (!any_condjump_p (insn)) + { + gcc_assert (BARRIER_P (NEXT_INSN (NEXT_INSN (insn)))); + delete_insn (NEXT_INSN (NEXT_INSN (insn))); + } + delete_insn (NEXT_INSN (insn)); + } } } } |