[Bug c++/98975] Infinite loop produces no assembly (including returning) with -O3
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Feb 5 13:46:19 GMT 2021
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98975
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The only thing that should be fixed is whatever code invokes the UB.
There is no bug on the compiler side, you essentially end up with
__builtin_unreachable (); in place of the loop.
You can use -fsanitize=unreachable to get a runtime diagnostics instead if the
UB is turned into __builtin_unreachable ().
More information about the Gcc-bugs
mailing list