]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
tree-cfg.c (find_taken_edge): Abort if we are given a statement that is neither COND_...
authorKazu Hirata <kazu@cs.umass.edu>
Wed, 3 Nov 2004 01:40:56 +0000 (01:40 +0000)
committerKazu Hirata <kazu@gcc.gnu.org>
Wed, 3 Nov 2004 01:40:56 +0000 (01:40 +0000)
* tree-cfg.c (find_taken_edge): Abort if we are given a
statement that is neither COND_EXPR nor SWITCH_EXPR.

From-SVN: r90015

gcc/ChangeLog
gcc/tree-cfg.c

index f1234bacec6a7ebed651b67def7aaac38d098578..d3d8d612185de25a00f2ddc817869d2b3b381c2d 100644 (file)
@@ -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
index c886f6a56168f79263fc0afcba8fa526118546dc..b6d288bfca8204b68eea299951a3d33edd8233bb 100644 (file)
@@ -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 ();
 }