Hello,

Le 27/09/2023 à 12:46, Jakub Jelinek a écrit :
--- gcc/vec.h.jj        2023-09-27 10:38:50.635845540 +0200
+++ gcc/vec.h   2023-09-27 12:11:56.665586490 +0200
@@ -1028,13 +1050,17 @@ template<typename T, typename A>
  inline void
  vec<T, A, vl_embed>::truncate (unsigned size)
  {
-  gcc_checking_assert (length () >= size);
+  unsigned l = length ();
+  gcc_checking_assert (l >= size);
+  if (!std::is_trivially_destructible <T>::value)
+    vec_destruct (address () + l, l - size);

Shouldn't this line be:

        vec_destruct (address () + *size*, l - size);

instead?

    m_vecpfx.m_num = size;
  }

Reply via email to