aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKazu Hirata <kazu@cs.umass.edu>2004-11-03 01:40:56 +0000
committerKazu Hirata <kazu@gcc.gnu.org>2004-11-03 01:40:56 +0000
commit359202709b30a7b66b858591dfba5621caa0e5aa (patch)
treee82603b1a59f6e3b9dd04f496a06114c598cbddd
parente597a4d366844db62a57cc385aedb1e8dff266b5 (diff)
downloadgcc-359202709b30a7b66b858591dfba5621caa0e5aa.zip
gcc-359202709b30a7b66b858591dfba5621caa0e5aa.tar.gz
gcc-359202709b30a7b66b858591dfba5621caa0e5aa.tar.bz2
tree-cfg.c (find_taken_edge): Abort if we are given a statement that is neither COND_EXPR nor SWITCH_EXPR.
* tree-cfg.c (find_taken_edge): Abort if we are given a statement that is neither COND_EXPR nor SWITCH_EXPR. From-SVN: r90015
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/tree-cfg.c8
2 files changed, 9 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index f1234ba..d3d8d61 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2004-11-03 Kazu Hirata <kazu@cs.umass.edu>
+
+ * tree-cfg.c (find_taken_edge): Abort if we are given a
+ statement that is neither COND_EXPR nor SWITCH_EXPR.
+
2004-11-02 Zdenek Dvorak <dvorakz@suse.cz>
* fold-const.c (fold): Reassociate also (x - mult) + mult and
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index c886f6a..b6d288b 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -1941,9 +1941,9 @@ cleanup_control_expr_graph (basic_block bb, block_stmt_iterator bsi)
}
-/* Given a control block BB and a predicate VAL, return the edge that
- will be taken out of the block. If VAL does not match a unique
- edge, NULL is returned. */
+/* Given a basic block BB ending with COND_EXPR or SWITCH_EXPR, and a
+ predicate VAL, return the edge that will be taken out of the block.
+ If VAL does not match a unique edge, NULL is returned. */
edge
find_taken_edge (basic_block bb, tree val)
@@ -1971,7 +1971,7 @@ find_taken_edge (basic_block bb, tree val)
if (TREE_CODE (stmt) == SWITCH_EXPR)
return find_taken_edge_switch_expr (bb, val);
- return EDGE_SUCC (bb, 0);
+ gcc_unreachable ();
}