https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86732
--- Comment #7 from Marc Glisse <glisse at gcc dot gnu.org> --- (In reply to Jeffrey A. Law from comment #5) > And FWIW, I think we should be using __builtin_trap rather than > __builtin_unreachable in many more places because of the security concerns. It would be better to control it with flags instead of doing it inconsistently depending on who wrote each pass. We already have -fsanitize=unreachable -fsanitize-undefined-trap-on-error to automatically replace __builtin_unreachable with __builtin_trap. However, we do not have an opposite 'performance' option for cases where security is irrelevant.