aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1994-10-07 16:13:58 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1994-10-07 16:13:58 -0400
commite19571dbde916e6b64ffe8baa9e94e64ebd15f83 (patch)
treeaf909c2bc37d7f4ff84a11601f5638390bf16e6e /gcc
parent3d771dfd7ae13f303ed9fe346df8364adb2c702d (diff)
downloadgcc-e19571dbde916e6b64ffe8baa9e94e64ebd15f83.zip
gcc-e19571dbde916e6b64ffe8baa9e94e64ebd15f83.tar.gz
gcc-e19571dbde916e6b64ffe8baa9e94e64ebd15f83.tar.bz2
(preserve_temp_slots): If X cannot be a temp slot, preserve all things
whose address was taken at the present level. From-SVN: r8238
Diffstat (limited to 'gcc')
-rw-r--r--gcc/function.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/gcc/function.c b/gcc/function.c
index 00801cd..b0d76ec 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -1040,12 +1040,19 @@ preserve_temp_slots (x)
p = find_temp_slot_from_address (x);
/* If X is not in memory or is at a constant address, it cannot be in
- a temporary slot. */
+ a temporary slot, but it can contain something whose address was
+ taken. */
if (p == 0 && (GET_CODE (x) != MEM || CONSTANT_P (XEXP (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;
+ }
/* 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)