summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1994-10-31 07:24:20 -0500
committerRichard Kenner <kenner@gcc.gnu.org>1994-10-31 07:24:20 -0500
commit73620b82c8141210910ac4451364eab5cbf723b8 (patch)
tree2f82d37e46a2555b37f1a4e08913605fea25ca99
parent7a0b7b9a972c599a69113e5baf619fcb28acb578 (diff)
downloadgcc-73620b82c8141210910ac4451364eab5cbf723b8.tar.gz
(preserve_temp_slots): Preserve anything whose address was taken when
X is zero. From-SVN: r8363
-rw-r--r--gcc/function.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/gcc/function.c b/gcc/function.c
index 2024933eb32..821d61ac710 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -1028,8 +1028,16 @@ preserve_temp_slots (x)
{
struct temp_slot *p = 0;
+ /* If there is no result, we still might have some objects whose address
+ were taken, so we need to make sure they stay around. */
if (x == 0)
- return;
+ {
+ for (p = temp_slots; p; p = p->next)
+ if (p->in_use && p->level == temp_slot_level && p->addr_taken)
+ p->level--;
+
+ return;
+ }
/* If X is a register that is being used as a pointer, see if we have
a temporary slot we know it points to. To be consistent with
@@ -1051,7 +1059,7 @@ preserve_temp_slots (x)
}
/* First see if we can find a match. */
- if ( p== 0)
+ if (p == 0)
p = find_temp_slot_from_address (XEXP (x, 0));
if (p != 0)