https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65583
--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> --- So, can you try to schedule another NEXT_PASS (pass_rebuild_cgraph_edges); right after ubsan pass if that fixes it? And then move that right before ubsan and see if it is broken again?