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

--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Reduced:

#include <vector>

int main()
{
  struct X
  {
    X(int) { throw 1; }     // Cannot successfully construct an X.
    ~X() { VERIFY(false); } // So should never need to destroy one.
  };

  try
  {
    int i[1]{};
    std::vector<X> v(std::from_range, i);
  }
  catch (int)
  {
  }
}

Reply via email to