https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119999
--- Comment #7 from Jonathan Wakely <redi at gcc dot gnu.org> --- N.B. with -O3 we just exit without aborting or looping, even after r14-2709. That's OK, because the behaviour is undefined. It would be nice if we inserted an unreachable or a trap that -fsanitize=undefined could diagnose. Use -fno-finite-loops to make GCC accept the code as valid.