Hi, this patch annotates vec::copy so it shows better in stats. I still do not see how auto vecs gets miscounted.
Bootstrapped/regtested x86_64-linux, comitted. Honza * vec.h (vec<T, va_heap, vl_ptr>::copy): Pass mem stat info. diff --git a/gcc/vec.h b/gcc/vec.h index 3ad26972a62..14d77e87342 100644 --- a/gcc/vec.h +++ b/gcc/vec.h @@ -1731,7 +1731,7 @@ vec<T, va_heap, vl_ptr>::copy (ALONE_MEM_STAT_DECL) const { vec<T, va_heap, vl_ptr> new_vec = vNULL; if (length ()) - new_vec.m_vec = m_vec->copy (); + new_vec.m_vec = m_vec->copy (ALONE_PASS_MEM_STAT); return new_vec; }