+2016-12-22 Jakub Jelinek <jakub@redhat.com>
+
+ PR bootstrap/78817
+ * vec.h (vec<T, va_heap, vl_ptr>::safe_grow_cleared): Revert
+ 2016-12-15 change.
+
2016-12-21 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/78580
vec<T, va_heap, vl_ptr>::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);
}