summaryrefslogtreecommitdiff
path: root/gcc/function.c
diff options
context:
space:
mode:
authorKazu Hirata <kazu@gcc.gnu.org>2007-01-03 08:04:01 +0000
committerKazu Hirata <kazu@gcc.gnu.org>2007-01-03 08:04:01 +0000
commita590ac6560e0100d139c98367367bf7e0a467df5 (patch)
treeaadfa1db2616271ff973c978a56b4690b7aefe12 /gcc/function.c
parent7bda5cc2e632d9f1ab1379bb94fbb226d13afc55 (diff)
downloadgcc-a590ac6560e0100d139c98367367bf7e0a467df5.tar.gz
alias.c (init_alias_analysis): Use VEC_safe_grow_cleared.
* alias.c (init_alias_analysis): Use VEC_safe_grow_cleared. * cfgbuild.c (find_basic_blocks): Likewise. * cfgrtl.c (rtl_create_basic_block): Likewise. * function.c (temp_slots_at_level): Likewise. * reg-stack.c (stack_regs_mentioned): Likewise. * regclass.c (allocate_reg_info): Likewise. * tree-cfg.c (init_empty_tree_cfg, build_tree_cfg, create_bb, set_bb_for_stmt, move_block_to_fn): Likewise. * tree-complex.c (tree_lower_complex): Likewise. * vec.h (VEC_safe_grow_cleared): New. From-SVN: r120386
Diffstat (limited to 'gcc/function.c')
-rw-r--r--gcc/function.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/gcc/function.c b/gcc/function.c
index 581c0834d44..b657e2490eb 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -544,15 +544,7 @@ static struct temp_slot **
temp_slots_at_level (int level)
{
if (level >= (int) VEC_length (temp_slot_p, used_temp_slots))
- {
- 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));
- }
+ VEC_safe_grow_cleared (temp_slot_p, gc, used_temp_slots, level + 1);
return &(VEC_address (temp_slot_p, used_temp_slots)[level]);
}