PR bootstrap/78817 - stage2 bootstrap failure in vec.h:1613:5: error: argument 1 null where non-null expected after r243661
gcc/ChangeLog: * vec.h (vec<T, va_heap, vl_ptr>::safe_grow_cleared): Assert a pointer is non-null. From-SVN: r243736
This commit is contained in:
parent
2ae30b147b
commit
7bd1e2edf9
@ -1,3 +1,9 @@
|
||||
2016-12-15 Martin Sebor <msebor@redhat.com>
|
||||
|
||||
PR bootstrap/78817
|
||||
* vec.h (vec<T, va_heap, vl_ptr>::safe_grow_cleared): Assert
|
||||
a pointer is non-null.
|
||||
|
||||
2016-12-15 Andrew Senkevich <andrew.senkevich@intel.com>
|
||||
|
||||
* config/i386/avx512bwintrin.h: Add new k-mask intrinsics.
|
||||
|
14
gcc/vec.h
14
gcc/vec.h
@ -1607,10 +1607,16 @@ inline void
|
||||
vec<T, va_heap, vl_ptr>::safe_grow_cleared (unsigned len MEM_STAT_DECL)
|
||||
{
|
||||
unsigned oldlen = length ();
|
||||
size_t sz = sizeof (T) * (len - oldlen);
|
||||
safe_grow (len PASS_MEM_STAT);
|
||||
if (sz != 0)
|
||||
memset (&(address ()[oldlen]), 0, sz);
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user