aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMike Stump <mrs@gcc.gnu.org>1996-01-16 22:40:15 +0000
committerMike Stump <mrs@gcc.gnu.org>1996-01-16 22:40:15 +0000
commit9ba73d3880e060602e86ca1a048969fe8b1baea7 (patch)
tree8cec261e23f0f8482bcebc73bfb5c852924f36e2 /gcc
parentf14c3e3d872e4a527640c3255e16187b48d3e32b (diff)
downloadgcc-9ba73d3880e060602e86ca1a048969fe8b1baea7.zip
gcc-9ba73d3880e060602e86ca1a048969fe8b1baea7.tar.gz
gcc-9ba73d3880e060602e86ca1a048969fe8b1baea7.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/expr.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index f2ed65c..941ee6c 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -6406,6 +6406,10 @@ expand_expr (exp, target, tmode, modifier)
/* ??? deprecated, use sequences instead. */
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. */
cond = make_node (RTL_EXPR);
TREE_TYPE (cond) = integer_type_node;
@@ -6422,6 +6426,8 @@ expand_expr (exp, target, tmode, modifier)
left_cleanups, right_cleanups);
new_cleanups = fold (new_cleanups);
+ pop_obstacks ();
+
/* Now add in the conditionalized cleanups. */
cleanups_this_call
= tree_cons (NULL_TREE, new_cleanups, cleanups_this_call);
@@ -9156,6 +9162,10 @@ defer_cleanups_to (old_cleanups)
/* reverse them so that we can build them in the right order. */
cleanups = nreverse (cleanups);
+ /* All cleanups must be on the function_obstack. */
+ push_obstacks_nochange ();
+ resume_temporary_allocation ();
+
while (cleanups)
{
if (new_cleanups)
@@ -9166,6 +9176,8 @@ defer_cleanups_to (old_cleanups)
cleanups = TREE_CHAIN (cleanups);
}
+
+ pop_obstacks ();
}
return new_cleanups;
@@ -9361,6 +9373,10 @@ do_jump (exp, if_false_label, if_true_label)
emit_move_insn (flag, const1_rtx);
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. */
cond = make_node (RTL_EXPR);
TREE_TYPE (cond) = integer_type_node;
@@ -9373,6 +9389,8 @@ do_jump (exp, if_false_label, if_true_label)
cleanups, integer_zero_node);
new_cleanups = fold (new_cleanups);
+ pop_obstacks ();
+
/* Now add in the conditionalized 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)
emit_move_insn (flag, const1_rtx);
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. */
cond = make_node (RTL_EXPR);
TREE_TYPE (cond) = integer_type_node;
@@ -9431,6 +9453,8 @@ do_jump (exp, if_false_label, if_true_label)
cleanups, integer_zero_node);
new_cleanups = fold (new_cleanups);
+ pop_obstacks ();
+
/* Now add in the conditionalized cleanups. */
cleanups_this_call
= tree_cons (NULL_TREE, new_cleanups, cleanups_this_call);