Commit 9ba73d38 by Mike Stump

expr.c (expand_expr, [...]): Make sure cleanups live on the function_obstack as…

expr.c (expand_expr, [...]): Make sure cleanups live on the function_obstack as they are used by the...

	* expr.c (expand_expr, case COND_EXPR): Make sure cleanups live on
	the function_obstack as they are used by the exception handling code.
	(defer_cleanups_to): Ditto.
	(TRUTH_ANDIF_EXPR): Ditto.
	(TRUTH_ORIF_EXPR): Ditto.
Fixes eh43.C

From-SVN: r11033
parent f14c3e3d
...@@ -6406,6 +6406,10 @@ expand_expr (exp, target, tmode, modifier) ...@@ -6406,6 +6406,10 @@ expand_expr (exp, target, tmode, modifier)
/* ??? deprecated, use sequences instead. */ /* ??? deprecated, use sequences instead. */
reorder_insns (NEXT_INSN (last), get_last_insn (), dest_right_flag); reorder_insns (NEXT_INSN (last), get_last_insn (), dest_right_flag);
/* All cleanups must be on the function_obstack. */
push_obstacks_nochange ();
resume_temporary_allocation ();
/* convert flag, which is an rtx, into a tree. */ /* convert flag, which is an rtx, into a tree. */
cond = make_node (RTL_EXPR); cond = make_node (RTL_EXPR);
TREE_TYPE (cond) = integer_type_node; TREE_TYPE (cond) = integer_type_node;
...@@ -6422,6 +6426,8 @@ expand_expr (exp, target, tmode, modifier) ...@@ -6422,6 +6426,8 @@ expand_expr (exp, target, tmode, modifier)
left_cleanups, right_cleanups); left_cleanups, right_cleanups);
new_cleanups = fold (new_cleanups); new_cleanups = fold (new_cleanups);
pop_obstacks ();
/* Now add in the conditionalized cleanups. */ /* Now add in the conditionalized cleanups. */
cleanups_this_call cleanups_this_call
= tree_cons (NULL_TREE, new_cleanups, cleanups_this_call); = tree_cons (NULL_TREE, new_cleanups, cleanups_this_call);
...@@ -9156,6 +9162,10 @@ defer_cleanups_to (old_cleanups) ...@@ -9156,6 +9162,10 @@ defer_cleanups_to (old_cleanups)
/* reverse them so that we can build them in the right order. */ /* reverse them so that we can build them in the right order. */
cleanups = nreverse (cleanups); cleanups = nreverse (cleanups);
/* All cleanups must be on the function_obstack. */
push_obstacks_nochange ();
resume_temporary_allocation ();
while (cleanups) while (cleanups)
{ {
if (new_cleanups) if (new_cleanups)
...@@ -9166,6 +9176,8 @@ defer_cleanups_to (old_cleanups) ...@@ -9166,6 +9176,8 @@ defer_cleanups_to (old_cleanups)
cleanups = TREE_CHAIN (cleanups); cleanups = TREE_CHAIN (cleanups);
} }
pop_obstacks ();
} }
return new_cleanups; return new_cleanups;
...@@ -9361,6 +9373,10 @@ do_jump (exp, if_false_label, if_true_label) ...@@ -9361,6 +9373,10 @@ do_jump (exp, if_false_label, if_true_label)
emit_move_insn (flag, const1_rtx); emit_move_insn (flag, const1_rtx);
emit_insns (seq2); emit_insns (seq2);
/* All cleanups must be on the function_obstack. */
push_obstacks_nochange ();
resume_temporary_allocation ();
/* convert flag, which is an rtx, into a tree. */ /* convert flag, which is an rtx, into a tree. */
cond = make_node (RTL_EXPR); cond = make_node (RTL_EXPR);
TREE_TYPE (cond) = integer_type_node; TREE_TYPE (cond) = integer_type_node;
...@@ -9373,6 +9389,8 @@ do_jump (exp, if_false_label, if_true_label) ...@@ -9373,6 +9389,8 @@ do_jump (exp, if_false_label, if_true_label)
cleanups, integer_zero_node); cleanups, integer_zero_node);
new_cleanups = fold (new_cleanups); new_cleanups = fold (new_cleanups);
pop_obstacks ();
/* Now add in the conditionalized cleanups. */ /* Now add in the conditionalized cleanups. */
cleanups_this_call cleanups_this_call
= tree_cons (NULL_TREE, new_cleanups, cleanups_this_call); = tree_cons (NULL_TREE, new_cleanups, cleanups_this_call);
...@@ -9419,6 +9437,10 @@ do_jump (exp, if_false_label, if_true_label) ...@@ -9419,6 +9437,10 @@ do_jump (exp, if_false_label, if_true_label)
emit_move_insn (flag, const1_rtx); emit_move_insn (flag, const1_rtx);
emit_insns (seq2); emit_insns (seq2);
/* All cleanups must be on the function_obstack. */
push_obstacks_nochange ();
resume_temporary_allocation ();
/* convert flag, which is an rtx, into a tree. */ /* convert flag, which is an rtx, into a tree. */
cond = make_node (RTL_EXPR); cond = make_node (RTL_EXPR);
TREE_TYPE (cond) = integer_type_node; TREE_TYPE (cond) = integer_type_node;
...@@ -9431,6 +9453,8 @@ do_jump (exp, if_false_label, if_true_label) ...@@ -9431,6 +9453,8 @@ do_jump (exp, if_false_label, if_true_label)
cleanups, integer_zero_node); cleanups, integer_zero_node);
new_cleanups = fold (new_cleanups); new_cleanups = fold (new_cleanups);
pop_obstacks ();
/* Now add in the conditionalized cleanups. */ /* Now add in the conditionalized cleanups. */
cleanups_this_call cleanups_this_call
= tree_cons (NULL_TREE, new_cleanups, cleanups_this_call); = tree_cons (NULL_TREE, new_cleanups, cleanups_this_call);
......
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