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

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Created attachment 54628
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54628&action=edit
Gzipped preprocessed output

Similar errors for this code with -std=c++20 -O2:

#include <vector>                                               

void test01()
{
  std::vector<int> v1, v2{5, 6};
  int n = 0;
  std::vector<int>::iterator it = v1.insert(v1.cbegin(), n);
  it = v1.insert(v1.cbegin(), 1);
  it = v1.insert(v1.cbegin(), {2, 3});
  it = v1.insert(v1.cbegin(), 1, 4);
  it = v1.insert(v1.cbegin(), v2.begin(), v2.end());
}

Reply via email to