diff options
author | kazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-12-02 16:43:33 +0000 |
---|---|---|
committer | kazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-12-02 16:43:33 +0000 |
commit | 7386de5d4cc6e07723416322bb57a4cbafa480ed (patch) | |
tree | 4264c08c2e3e8821d6002f0dab71bd15d70f6cb0 /gcc/tree-cfg.c | |
parent | 4b2bb45ed5e9f90ab9a015323900c3c11068bc51 (diff) | |
download | gcc-7386de5d4cc6e07723416322bb57a4cbafa480ed.tar.gz |
* tree-cfg.c (phi_alternatives_equal): Check that PHI_ARG_DEF
is not null.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@91646 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-cfg.c')
-rw-r--r-- | gcc/tree-cfg.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c index 93ce053f327..8af27b9a94f 100644 --- a/gcc/tree-cfg.c +++ b/gcc/tree-cfg.c @@ -2264,19 +2264,17 @@ find_case_label_for_value (tree switch_expr, tree val) static bool phi_alternatives_equal (basic_block dest, edge e1, edge e2) { - tree phi, val1, val2; - int n1, n2; + int n1 = e1->dest_idx; + int n2 = e2->dest_idx; + tree phi; for (phi = phi_nodes (dest); phi; phi = PHI_CHAIN (phi)) { - n1 = phi_arg_from_edge (phi, e1); - n2 = phi_arg_from_edge (phi, e2); - - gcc_assert (n1 >= 0); - gcc_assert (n2 >= 0); + tree val1 = PHI_ARG_DEF (phi, n1); + tree val2 = PHI_ARG_DEF (phi, n2); - val1 = PHI_ARG_DEF (phi, n1); - val2 = PHI_ARG_DEF (phi, n2); + gcc_assert (val1 != NULL_TREE); + gcc_assert (val2 != NULL_TREE); if (!operand_equal_for_phi_arg_p (val1, val2)) return false; |