summaryrefslogtreecommitdiff
path: root/gnu/egcs/gcc/function.c
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/egcs/gcc/function.c')
-rw-r--r--gnu/egcs/gcc/function.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/gnu/egcs/gcc/function.c b/gnu/egcs/gcc/function.c
index 60afafa9c19..a4033a9a6b8 100644
--- a/gnu/egcs/gcc/function.c
+++ b/gnu/egcs/gcc/function.c
@@ -1428,7 +1428,16 @@ free_temps_for_rtl_expr (t)
for (p = temp_slots; p; p = p->next)
if (p->rtl_expr == t)
- p->in_use = 0;
+ {
+ /* If this slot is below the current TEMP_SLOT_LEVEL, then it
+ needs to be preserved. This can happen if a temporary in
+ the RTL_EXPR was addressed; preserve_temp_slots will move
+ the temporary into a higher level. */
+ if (temp_slot_level <= p->level)
+ p->in_use = 0;
+ else
+ p->rtl_expr = NULL_TREE;
+ }
combine_temp_slots ();
}