https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91910
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Seems like this is a bug in the testcase rather than libstdc++. >exemplifying concurrent destruction of iterator and container That seems like a disaster waiting to happen. Because once the container is gone, the iterator is also considered gone. If you did this in a normal code without threads it would be invalid to do in that order anyways.