aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Henderson <rth@cygnus.com>2000-05-08 15:04:39 -0700
committerRichard Henderson <rth@gcc.gnu.org>2000-05-08 15:04:39 -0700
commit4fb9b83058f9bb7c27c2fde58ef724a316a7b97f (patch)
treec7cf855400513a83eddc59b3cc0f91277804264c
parentbdcabcd45756203cbf95966a5e500d0b305271a7 (diff)
downloadgcc-4fb9b83058f9bb7c27c2fde58ef724a316a7b97f.zip
gcc-4fb9b83058f9bb7c27c2fde58ef724a316a7b97f.tar.gz
gcc-4fb9b83058f9bb7c27c2fde58ef724a316a7b97f.tar.bz2
flow.c (init_propagate_block_info): Watch out for conditional branch to next instruction, and thus one outgoing edge.
* flow.c (init_propagate_block_info): Watch out for conditional branch to next instruction, and thus one outgoing edge. From-SVN: r33775
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/flow.c25
2 files changed, 24 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 81867aa..3318d80 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2000-05-08 Richard Henderson <rth@cygnus.com>
+
+ * flow.c (init_propagate_block_info): Watch out for conditional
+ branch to next instruction, and thus one outgoing edge.
+
2000-05-08 Nick Clifton <nickc@cygnus.com>
* config/i386/i386.h (ELIMINABLE_REGS): Fix comment.
diff --git a/gcc/flow.c b/gcc/flow.c
index 5e05b02..c978ff1 100644
--- a/gcc/flow.c
+++ b/gcc/flow.c
@@ -3573,16 +3573,29 @@ init_propagate_block_info (bb, live, local_set, flags)
int i;
/* Identify the successor blocks. */
- bb_false = bb->succ->succ_next->dest;
bb_true = bb->succ->dest;
- if (bb->succ->flags & EDGE_FALLTHRU)
+ if (bb->succ->succ_next != NULL)
{
- basic_block t = bb_false;
+ bb_false = bb->succ->succ_next->dest;
+
+ if (bb->succ->flags & EDGE_FALLTHRU)
+ {
+ basic_block t = bb_false;
+ bb_false = bb_true;
+ bb_true = t;
+ }
+ else if (! (bb->succ->succ_next->flags & EDGE_FALLTHRU))
+ abort ();
+ }
+ else
+ {
+ /* This can happen with a conditional jump to the next insn. */
+ if (JUMP_LABEL (bb->end) != bb_true->head)
+ abort ();
+
+ /* Simplest way to do nothing. */
bb_false = bb_true;
- bb_true = t;
}
- else if (! (bb->succ->succ_next->flags & EDGE_FALLTHRU))
- abort ();
/* Extract the condition from the branch. */
cond_true = XEXP (SET_SRC (PATTERN (bb->end)), 0);