https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119786
--- Comment #3 from Sam James <sjames at gcc dot gnu.org> --- Created attachment 61129 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=61129&action=edit pr119786.patch This patch together with the PR119785 fix survives bootstrap-ubsan with UBSAN_OPTIONS set to catch any failures too.