diff options
Diffstat (limited to 'gcc/fibonacci_heap.h')
-rw-r--r-- | gcc/fibonacci_heap.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/fibonacci_heap.h b/gcc/fibonacci_heap.h index 9961648d505..ebd1a8bdafd 100644 --- a/gcc/fibonacci_heap.h +++ b/gcc/fibonacci_heap.h @@ -648,17 +648,18 @@ template<class K, class V> void fibonacci_heap<K,V>::consolidate () { const int D = 1 + 8 * sizeof (long); - auto_vec<fibonacci_node<K,V> *, D> a; + fibonacci_node<K,V> *a[D]; fibonacci_node<K,V> *w, *x, *y; int i, d; - a.quick_grow_cleared (D); + memset (a, 0, sizeof (a)); while ((w = m_root) != NULL) { x = w; remove_root (w); d = x->m_degree; + gcc_checking_assert (d < D); while (a[d] != NULL) { y = a[d]; |