https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94392
--- Comment #3 from joseph at codesourcery dot com <joseph at codesourcery dot com> --- I'm not sure the existing infinite loop removal is valid for any C standard version. The C (C11 and later) rule against infinite loops only applies when the loop is written as an iteration statement whose controlling expression is not constant (not if it's written with goto, or has a constant controlling expression); it's not the more general rule about forward progress that C++ has.