https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62313
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- You don't protect either the iterators or the list when touching it so I don't think this is a bug. If they truly independent lists and that was causing issues, then yes there would be an issue.