summaryrefslogtreecommitdiff
path: root/gcc/function.c
diff options
context:
space:
mode:
authormrs <mrs@138bc75d-0d04-0410-961f-82ee72b054a4>1994-07-08 20:45:14 +0000
committermrs <mrs@138bc75d-0d04-0410-961f-82ee72b054a4>1994-07-08 20:45:14 +0000
commit6fd6341fc000a75eecd937913459e2c6e5036d8e (patch)
treecb70ced3c3a2abd4edd8e1ae1c3303cc21d9e561 /gcc/function.c
parent6851745a46822473e42f135eacc79bcc5c324402 (diff)
downloadgcc-6fd6341fc000a75eecd937913459e2c6e5036d8e.tar.gz
fix temp lifetime (FOR TARGET_EXPRs only)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@7681 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/function.c')
-rw-r--r--gcc/function.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/gcc/function.c b/gcc/function.c
index 4b9e33cd33b..16d4a935b83 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -771,9 +771,10 @@ assign_outer_stack_local (mode, size, align, function)
SIZE is the size in units of the space required. We do no rounding here
since assign_stack_local will do any required rounding.
- KEEP is non-zero if this slot is to be retained after a call to
- free_temp_slots. Automatic variables for a block are allocated with this
- flag. */
+ KEEP is 1 if this slot is to be retained after a call to
+ free_temp_slots. Automatic variables for a block are allocated
+ with this flag. KEEP is 2, if we allocate a longer term temporary,
+ whose lifetime is controlled by CLEANUP_POINT_EXPRs. */
rtx
assign_stack_temp (mode, size, keep)
@@ -845,8 +846,16 @@ assign_stack_temp (mode, size, keep)
p->in_use = 1;
p->rtl_expr = sequence_rtl_expr;
- p->level = temp_slot_level;
- p->keep = keep;
+ if (keep == 2)
+ {
+ p->level = target_temp_slot_level;
+ p->keep = 0;
+ }
+ else
+ {
+ p->level = temp_slot_level;
+ p->keep = keep;
+ }
return p->slot;
}
@@ -4615,6 +4624,7 @@ init_function_start (subr, filename, line)
/* We have not allocated any temporaries yet. */
temp_slots = 0;
temp_slot_level = 0;
+ target_temp_slot_level = 0;
/* Within function body, compute a type's size as soon it is laid out. */
immediate_size_expand++;