https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109267
--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Created attachment 61200 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=61200&action=edit Patch which will need testcases for this patch should fix it. It replaces __builtin_unreachable to __builtin_trap if it is the first non-debug statement and in the first (and only) bb.