diff options
Diffstat (limited to 'gcc/function.c')
-rw-r--r-- | gcc/function.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/function.c b/gcc/function.c index b657e24..581c083 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -544,7 +544,15 @@ static struct temp_slot ** temp_slots_at_level (int level) { if (level >= (int) VEC_length (temp_slot_p, used_temp_slots)) - VEC_safe_grow_cleared (temp_slot_p, gc, used_temp_slots, level + 1); + { + size_t old_length = VEC_length (temp_slot_p, used_temp_slots); + temp_slot_p *p; + + VEC_safe_grow (temp_slot_p, gc, used_temp_slots, level + 1); + p = VEC_address (temp_slot_p, used_temp_slots); + memset (&p[old_length], 0, + sizeof (temp_slot_p) * (level + 1 - old_length)); + } return &(VEC_address (temp_slot_p, used_temp_slots)[level]); } |