diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 757eded9a14..e388ec9660d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2013-11-05 Trevor Saunders + + * vec.c (vec_prefix::calculate_allocation): Don't try to handle the + case of no prefix and reserving zero slots, because when that's the + case we'll never get here. + * vec.h (va_heap::reserve): Don't try and handle + vec_prefix::calculate_allocation returning zero because that should + never happen. + 2013-11-05 Richard Biener PR middle-end/58941 diff --git a/gcc/vec.c b/gcc/vec.c index f3c331507d5..78252e0d088 100644 --- a/gcc/vec.c +++ b/gcc/vec.c @@ -187,9 +187,7 @@ vec_prefix::calculate_allocation (vec_prefix *pfx, unsigned reserve, num = pfx->m_num; } else if (!reserve) - /* If there's no vector, and we've not requested anything, then we - will create a NULL vector. */ - return 0; + gcc_unreachable (); /* We must have run out of room. */ gcc_assert (alloc - num < reserve); diff --git a/gcc/vec.h b/gcc/vec.h index f97e022f24a..b1ebda44f5e 100644 --- a/gcc/vec.h +++ b/gcc/vec.h @@ -283,11 +283,7 @@ va_heap::reserve (vec *&v, unsigned reserve, bool exact { unsigned alloc = vec_prefix::calculate_allocation (v ? &v->m_vecpfx : 0, reserve, exact); - if (!alloc) - { - release (v); - return; - } + gcc_assert (alloc); if (GATHER_STATISTICS && v) v->m_vecpfx.release_overhead ();