https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106099
--- Comment #14 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Created attachment 53496 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53496&action=edit gcc13-pr106099.patch Untested fix. There are 2 issues. One was that tree-cfg.cc was emitting __builtin_trap instead of __builtin_unreachable which needed vops (fixed by emitting .TRAP instead) and another one was that CDDCE was actually throwing away .TRAP calls - since PR44485 flags_from_decl_or_type actually implicitly adds ECF_LOOPING_CONST_OR_PURE to ECF_NORETURN|ECF_CONST normal calls, so __builtin_unreachable wasn't DCEd even when it is const and lhs was NULL, but for internal-fns that doesn't happen, so I had to add ECF_LOOPING_CONST_OR_PURE explicitly to avoid DCE of .TRAP.