aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorKazu Hirata <kazu@cs.umass.edu>2004-12-02 16:45:26 +0000
committerKazu Hirata <kazu@gcc.gnu.org>2004-12-02 16:45:26 +0000
commitd134295fc55c22292bc86e9dfb70bf9bdb5f7b47 (patch)
treeb1c9b9dbc015f55007366a6ed7706e10c31d3ac9 /gcc
parent5dd8841aa17a47ea6e0e6470e25de1e2ea40a99b (diff)
downloadgcc-d134295fc55c22292bc86e9dfb70bf9bdb5f7b47.zip
gcc-d134295fc55c22292bc86e9dfb70bf9bdb5f7b47.tar.gz
gcc-d134295fc55c22292bc86e9dfb70bf9bdb5f7b47.tar.bz2
tree-cfg.c (phi_alternatives_equal): Check that PHI_ARG_DEF is not null.
* tree-cfg.c (phi_alternatives_equal): Check that PHI_ARG_DEF is not null. From-SVN: r91647
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog3
-rw-r--r--gcc/tree-cfg.c9
2 files changed, 8 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 4793b24..5e1c337 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -3,6 +3,9 @@
* tree-cfg.c (phi_alternatives_equal): Check that PHI_ARG_DEF
is not null.
+ * tree-cfg.c (phi_alternatives_equal): Check that PHI_ARG_DEF
+ is not null.
+
2004-12-02 Jeff Law <law@redhat.com>
* tree-eh.c: Revert yesterday's change.
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index 8af27b9..3e04619 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -3941,7 +3941,6 @@ thread_jumps_from_bb (basic_block bb)
edge last, old;
basic_block dest, tmp, curr, old_dest;
tree phi;
- int arg;
/* If the edge is abnormal or its destination is not
forwardable, then there's nothing to do. */
@@ -4028,11 +4027,13 @@ thread_jumps_from_bb (basic_block bb)
have the same value as the argument associated with LAST.
Otherwise we would have changed our target block
above. */
+ int arg = last->dest_idx;
+
for (phi = phi_nodes (dest); phi; phi = PHI_CHAIN (phi))
{
- arg = phi_arg_from_edge (phi, last);
- gcc_assert (arg >= 0);
- add_phi_arg (phi, PHI_ARG_DEF (phi, arg), e);
+ tree def = PHI_ARG_DEF (phi, arg);
+ gcc_assert (def != NULL_TREE);
+ add_phi_arg (phi, def, e);
}
}