https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120004
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Another option which I am thinking about is just expanding __builtin_unreachable as the same as a trap. So at -O0, an explict __builtin_unreachable will turn into a trap. And the RTL optimizations don't take that much into account for unreachable either so having it as a trap seems ok.