https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97978
--- Comment #2 from Roger Sayle <roger at nextmovesoftware dot com> --- The -fno-PIC isn't required, as -Os alone is sufficient to trigger this ICE. I'm not sure if unconditionally calling __builtin_unreachable qualifies as "valid-code" (or possibly an error condition) but lra_assign shouldn't ICE. Removing or commenting out the conditional call to __builtin_unreachable in bp resolves the issue. It appears that the undefined behaviour produced by reaching __builtin_unreachable, with the mixture of pseudos and hard registers resulting from my change, leaves the CFG/LRA pass in an unexpected state, that breaks a required invariant...