https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85164
--- Comment #14 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> --- Yeah, the patch I committed fixed two separate instances of undefined overflow, but I think there are a lot more left. The testsuite results with bootstrap-ubsan show a lot of failures generally, so the compiler isn't UB-free even for our existing tests. I fixed another instance in r85164 that was unrelated to the testcases in this PR, so if you're just applying the patches locally, it'd be worth trying that as well. Could you open separate PRs for the new tests? We could perhaps have a meta-bug for ubsan failures too, if we don't already.