summaryrefslogtreecommitdiff
path: root/gcc/tree-cfg.c
diff options
context:
space:
mode:
authorkazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4>2004-11-04 22:07:39 +0000
committerkazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4>2004-11-04 22:07:39 +0000
commit0aa566003babcfdf69c55455598a2c0c440d680c (patch)
tree30f1b96da58dd9b0620f5c8de78c367da5fc1076 /gcc/tree-cfg.c
parentbe77fdebbc96e13ab848ea53ae5355231b8c70fc (diff)
downloadgcc-0aa566003babcfdf69c55455598a2c0c440d680c.tar.gz
* tree-cfg.c (find_taken_edge): Reject VAL begin NULL.
* tree-ssa-ccp.c (visit_cond_stmt): Don't call find_taken_edge with VAL being NULL. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@90083 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-cfg.c')
-rw-r--r--gcc/tree-cfg.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index 3c8a505815f..67b96a5737d 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -1954,15 +1954,16 @@ find_taken_edge (basic_block bb, tree val)
gcc_assert (stmt);
gcc_assert (is_ctrl_stmt (stmt));
+ gcc_assert (val);
/* If VAL is a predicate of the form N RELOP N, where N is an
SSA_NAME, we can usually determine its truth value. */
- if (val && COMPARISON_CLASS_P (val))
+ if (COMPARISON_CLASS_P (val))
val = fold (val);
/* If VAL is not a constant, we can't determine which edge might
be taken. */
- if (val == NULL || !really_constant_p (val))
+ if (!really_constant_p (val))
return NULL;
if (TREE_CODE (stmt) == COND_EXPR)