summaryrefslogtreecommitdiff
path: root/gcc/cfgexpand.c
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2010-11-23 15:16:43 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2010-11-23 15:16:43 +0000
commit2755d767d69c9b9df7fc3fa3e43431193be7888b (patch)
tree95d45f0b7a3cd58a3cc14a87016b385e22d8eeaf /gcc/cfgexpand.c
parentdd5fed3c0420569bf8e650bb94625242d3e23b1e (diff)
downloadgcc-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.c9
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));
+ }
}
}
}