aboutsummaryrefslogtreecommitdiff
path: root/gcc/gcse.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/gcse.c')
-rw-r--r--gcc/gcse.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/gcc/gcse.c b/gcc/gcse.c
index 69af463..6aace8f 100644
--- a/gcc/gcse.c
+++ b/gcc/gcse.c
@@ -2067,10 +2067,13 @@ dump_hash_table (file, name, table, table_size, total_size)
{
int i;
/* Flattened out table, so it's printed in proper order. */
- struct expr **flat_table = (struct expr **) alloca (total_size * sizeof (struct expr *));
- unsigned int *hash_val = (unsigned int *) alloca (total_size * sizeof (unsigned int));
+ struct expr **flat_table;
+ unsigned int *hash_val;
+
+ flat_table
+ = (struct expr **) xcalloc (total_size, sizeof (struct expr *));
+ hash_val = (unsigned int *) xmalloc (total_size * sizeof (unsigned int));
- bzero ((char *) flat_table, total_size * sizeof (struct expr *));
for (i = 0; i < table_size; i++)
{
struct expr *expr;
@@ -2096,6 +2099,10 @@ dump_hash_table (file, name, table, table_size, total_size)
}
fprintf (file, "\n");
+
+ /* Clean up. */
+ free (flat_table);
+ free (hash_val);
}
/* Record register first/last/block set information for REGNO in INSN.