aboutsummaryrefslogtreecommitdiff
path: root/gcc/cfgexpand.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2010-11-23 16:16:43 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2010-11-23 16:16:43 +0100
commit90eb3e33b896f57ec061b2404eab6de9e984d7a2 (patch)
tree95d45f0b7a3cd58a3cc14a87016b385e22d8eeaf /gcc/cfgexpand.c
parentae8358d69a0f237f466185b41396bb735793b460 (diff)
downloadgcc-90eb3e33b896f57ec061b2404eab6de9e984d7a2.zip
gcc-90eb3e33b896f57ec061b2404eab6de9e984d7a2.tar.gz
gcc-90eb3e33b896f57ec061b2404eab6de9e984d7a2.tar.bz2
re PR middle-end/46499 (gcc.c-torture/execute/20051021-1.c FAILs with -fno-tree-dominator-opts -fno-tree-ccp)
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. From-SVN: r167082
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 784639d..a65f12b 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));
+ }
}
}
}