https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59170
--- Comment #17 from Jonathan Wakely <redi at gcc dot gnu.org> --- I've added some more checks for non-debug iterators. The only thing remaining is to add checks for debug iterators to detect when they are past-the-end.