Fix off-by-one storage problem in irange_allocator.
gcc/ChangeLog: * value-range.h (irange_allocator::allocate): Increase newir storage by one.
This commit is contained in:
parent
44e20dce59
commit
952adf0218
1 changed files with 1 additions and 1 deletions
|
@ -670,7 +670,7 @@ irange_allocator::allocate (unsigned num_pairs)
|
|||
|
||||
struct newir {
|
||||
irange range;
|
||||
tree mem[1];
|
||||
tree mem[2];
|
||||
};
|
||||
size_t nbytes = (sizeof (newir) + sizeof (tree) * 2 * (num_pairs - 1));
|
||||
struct newir *r = (newir *) obstack_alloc (&m_obstack, nbytes);
|
||||
|
|
Loading…
Add table
Reference in a new issue