diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9704e67c64f..6d26102d9f1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Mon Jul 6 22:14:31 1998 Richard Henderson (rth@cygnus.com) + + * regclass.c (allocate_reg_info): Initialize the entire reg_data + virtual array. + Mon Jul 6 22:09:32 1998 Ian Lance Taylor Jeff Law diff --git a/gcc/regclass.c b/gcc/regclass.c index d76ace33499..2bb6b420957 100644 --- a/gcc/regclass.c +++ b/gcc/regclass.c @@ -1866,9 +1866,11 @@ allocate_reg_info (num_regs, new_p, renumber_p) size_t max_index = reg_data->max_index; reg_next = reg_data->next; - if (min_index <= num_regs) + if (min_index <= regno_allocated) { - size_t max = (max_index > num_regs) ? num_regs : max_index; + size_t max = max_index; + if (max > regno_allocated) + max = regno_allocated; if (!reg_data->used_p) /* page just allocated with calloc */ reg_data->used_p = 1; /* no need to zero */ else