https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114385
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> --- I think this might be due to changes to std::copy which tries to skip memcpy if it is only one element. My bet is maybe std::copy could add `if (end < begin) __builtin_unreachable();` in it and the code would be better optimized but then some warnings might not show up. Basically if I read this code correctly, the preconditions for this function is both begin and end are proper iterators and that `end >= begin` is holds true. What is happening is GCC gets `end - begin < 2` but then does not know if that could be negative and all things break lose.