diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-07-06 21:16:56 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-07-06 21:16:56 +0000 |
commit | 48495d4faf4670e2d72a6b4da05de920f98688e9 (patch) | |
tree | 6dd831c7c84945557c481a7ec346d223e2a54186 /gcc/regclass.c | |
parent | 349f7ff910e66fdc14bf4403155a80ff46bed63e (diff) | |
download | gcc-48495d4faf4670e2d72a6b4da05de920f98688e9.tar.gz |
* regclass.c (allocate_reg_info): Initialize the entire reg_data
virtual array.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@20961 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/regclass.c')
-rw-r--r-- | gcc/regclass.c | 6 |
1 files changed, 4 insertions, 2 deletions
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 |