summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/cfganal.c10
2 files changed, 12 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 06387e8aaac..4063e789146 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2003-01-15 Josef Zlomek <zlomekj@suse.cz>
+
+ * cfganal.c (set_edge_can_fallthru_flag): Clear the EDGE_CAN_FALLTHRU
+ flag before setting it.
+
2003-01-15 Roger Sayle <roger@eyesopen.com>
* c-semantics.c (genrtl_while_stmt): Improve initial RTL generation
diff --git a/gcc/cfganal.c b/gcc/cfganal.c
index a7878178fbd..325a64df1f8 100644
--- a/gcc/cfganal.c
+++ b/gcc/cfganal.c
@@ -225,10 +225,14 @@ set_edge_can_fallthru_flag ()
{
edge e;
- /* The FALLTHRU edge is also CAN_FALLTHRU edge. */
for (e = bb->succ; e; e = e->succ_next)
- if (e->flags & EDGE_FALLTHRU)
- e->flags |= EDGE_CAN_FALLTHRU;
+ {
+ e->flags &= ~EDGE_CAN_FALLTHRU;
+
+ /* The FALLTHRU edge is also CAN_FALLTHRU edge. */
+ if (e->flags & EDGE_FALLTHRU)
+ e->flags |= EDGE_CAN_FALLTHRU;
+ }
/* If the BB ends with an invertable condjump all (2) edges are
CAN_FALLTHRU edges. */