aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorBernd Schmidt <bernds@redhat.co.uk>2000-12-22 14:19:57 +0000
committerBernd Schmidt <bernds@gcc.gnu.org>2000-12-22 14:19:57 +0000
commitdb776d91b874c60165256215c68c21622fb7dcff (patch)
tree9ffc16f7d9225866e83fa97b886137ec7f378bf5 /gcc
parente2ea68269c30d99907a6f2b30605b22fb5f4ab17 (diff)
Backport a fix to the 2.95 branch
From-SVN: r38456
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/function.c11
2 files changed, 14 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 46935a9b7c4..0e202f39341 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,9 @@
2000-12-22 Bernd Schmidt <bernds@redhat.co.uk>
+ 2000-03-06 Mark Mitchell <mark@codesourcery.com>
+ * function.c (free_temps_for_rtl_expr): Don't free slots
+ that have been pushed into a higher level.
+
1999-12-16 David S. Miller <davem@redhat.com>
* expr.c (emit_move_insn_1): Only emit clobbers if one of
the outputs is a SUBREG.
diff --git a/gcc/function.c b/gcc/function.c
index 60afafa9c19..a4033a9a6b8 100644
--- a/gcc/function.c
+++ b/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 ();
}