https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83239

--- Comment #7 from Martin Sebor <msebor at gcc dot gnu.org> ---
An ever-so-slightly slightly simplified test case (no loop) is the following:

void bar (std::vector<int> &a, int num)
{
  if (num > 0)
    {
      const auto sz = a.size ();

      if (sz < 3)
        a.assign (1, 0);
      else
        a.resize (sz - 2);
  }
}

Reply via email to