From: Bernd Schmidt Date: Fri, 22 Dec 2000 14:19:57 +0000 (+0000) Subject: Backport a fix to the 2.95 branch X-Git-Tag: prereleases/gcc-2.95.3-test1~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=db776d91b874c60165256215c68c21622fb7dcff;p=thirdparty%2Fgcc.git Backport a fix to the 2.95 branch From-SVN: r38456 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 46935a9b7c41..0e202f393415 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,9 @@ 2000-12-22 Bernd Schmidt + 2000-03-06 Mark Mitchell + * 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 * 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 60afafa9c198..a4033a9a6b83 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 (); }