From: Jan Hubicka Date: Wed, 20 Nov 2019 15:45:53 +0000 (+0100) Subject: Workaround bogus warning in fibonacci_heap::consolidate. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8e361de1b08a579fe5d771be5ba47cf31533380c;p=gcc.git Workaround bogus warning in fibonacci_heap::consolidate. * fibonacci_heap.h (fibonacci_heap::consolidate): Turn auto_vec to ordinary array. From-SVN: r278504 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6eb037f7d45..7ba36985c43 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2019-11-20 Jan Hubicka + + * fibonacci_heap.h (fibonacci_heap::consolidate): Turn auto_vec + to ordinary array. + 2019-11-20 Jan Hubicka * fibonacci_heap.h (fibonacci_heap::fibonacci_heap): 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 void fibonacci_heap::consolidate () { const int D = 1 + 8 * sizeof (long); - auto_vec *, D> a; + fibonacci_node *a[D]; fibonacci_node *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];