https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114409
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Sam James from comment #1) > If you can think of a workaround, please let me know, as unfortunately this > loop is the one where the assert in the other bug gets hit :( An easy workaround is to add: asm("":::"memory"); Right after the opening `{`. But that might be too much of a hammer in some cases ...