https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109267
--- Comment #11 from Andrew Pinski <pinskia at gcc dot gnu.org> --- ``` proc check_effective_target_trap { } { return [check_no_messages_and_pattern trap "!\\(call" rtl-expand { void foo () { return __builtin_trap (); } } "" ] } ``` I think is what I need to detect if the target supports a trap instruction or expands to abort for __builtin_trap.