From: Jakub Jelinek Date: Thu, 22 Dec 2016 08:53:56 +0000 (+0100) Subject: re PR bootstrap/78817 (stage2 bootstrap failure in vec.h:1613:5: error: argument... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0b435c16901f5642e2767dc72a53aad251f57661;p=gcc.git re PR bootstrap/78817 (stage2 bootstrap failure in vec.h:1613:5: error: argument 1 null where non-null expected after r243661) PR bootstrap/78817 * vec.h (vec::safe_grow_cleared): Revert 2016-12-15 change. From-SVN: r243883 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 45743607cdb..0b3c84f814d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2016-12-22 Jakub Jelinek + + PR bootstrap/78817 + * vec.h (vec::safe_grow_cleared): Revert + 2016-12-15 change. + 2016-12-21 Vladimir Makarov PR rtl-optimization/78580 diff --git a/gcc/vec.h b/gcc/vec.h index 3877f2d8ffe..aa93411132b 100644 --- a/gcc/vec.h +++ b/gcc/vec.h @@ -1607,16 +1607,10 @@ inline void vec::safe_grow_cleared (unsigned len MEM_STAT_DECL) { unsigned oldlen = length (); - gcc_checking_assert (oldlen <= len); - - if (size_t sz = sizeof (T) * (len - oldlen)) - { - safe_grow (len PASS_MEM_STAT); - - T *p = address (); - gcc_assert (p != NULL); - memset (p + oldlen, 0, sz); - } + size_t sz = sizeof (T) * (len - oldlen); + safe_grow (len PASS_MEM_STAT); + if (sz != 0) + memset (&(address ()[oldlen]), 0, sz); }