http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58562
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> --- > If I turn off -D_GLIBCXX_DEBUG then the code works fine. That usually means "your code is buggy" That's the point of debug mode, it will abort instead of silently ignoring your buggy code. Please provide testcase code to reproduce the problem if you think the bug is in GCC not your code.