[Bug tree-optimization/95001] std::terminate() and abort() do not have __builtin_unreachable() semantics
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri May 8 11:43:10 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95001
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
My understanding of the request is to handle other noreturn functions in
assert_unreachable_fallthru_edge_p (or in callers of that function next to that
predicate), probably with similar requirements that there is no code before the
noreturn call. Though, I think that is something we can't do, for
__builtin_unreachable we can add the range info on the guarding SSA_NAME
because otherwise the program invokes UB. That is not the case with abort or
std::terminate, the program doesn't invoke UB, just calls the noreturn
function.
More information about the Gcc-bugs
mailing list