/* Fibonacci heap for GNU compiler.
- Copyright (C) 1998-2019 Free Software Foundation, Inc.
+ Copyright (C) 1998-2021 Free Software Foundation, Inc.
Contributed by Daniel Berlin (dan@cgsoftware.com).
Re-implemented in C++ by Martin Liska <mliska@suse.cz>
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];