Commit d134295f by Kazu Hirata Committed by Kazu Hirata

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
parent 5dd8841a
...@@ -3,6 +3,9 @@ ...@@ -3,6 +3,9 @@
* tree-cfg.c (phi_alternatives_equal): Check that PHI_ARG_DEF * tree-cfg.c (phi_alternatives_equal): Check that PHI_ARG_DEF
is not null. 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> 2004-12-02 Jeff Law <law@redhat.com>
* tree-eh.c: Revert yesterday's change. * tree-eh.c: Revert yesterday's change.
......
...@@ -3941,7 +3941,6 @@ thread_jumps_from_bb (basic_block bb) ...@@ -3941,7 +3941,6 @@ thread_jumps_from_bb (basic_block bb)
edge last, old; edge last, old;
basic_block dest, tmp, curr, old_dest; basic_block dest, tmp, curr, old_dest;
tree phi; tree phi;
int arg;
/* If the edge is abnormal or its destination is not /* If the edge is abnormal or its destination is not
forwardable, then there's nothing to do. */ forwardable, then there's nothing to do. */
...@@ -4028,11 +4027,13 @@ thread_jumps_from_bb (basic_block bb) ...@@ -4028,11 +4027,13 @@ thread_jumps_from_bb (basic_block bb)
have the same value as the argument associated with LAST. have the same value as the argument associated with LAST.
Otherwise we would have changed our target block Otherwise we would have changed our target block
above. */ above. */
int arg = last->dest_idx;
for (phi = phi_nodes (dest); phi; phi = PHI_CHAIN (phi)) for (phi = phi_nodes (dest); phi; phi = PHI_CHAIN (phi))
{ {
arg = phi_arg_from_edge (phi, last); tree def = PHI_ARG_DEF (phi, arg);
gcc_assert (arg >= 0); gcc_assert (def != NULL_TREE);
add_phi_arg (phi, PHI_ARG_DEF (phi, arg), e); add_phi_arg (phi, def, e);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment