https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106945
--- Comment #3 from anlauf at gcc dot gnu.org --- It is -fcheck=bounds that is required to trigger the failure. Replacing -ftrapv by -fsanitize=undefined produces the same error.
anlauf at gcc dot gnu.org via Gcc-bugs Fri, 23 Sep 2022 12:56:51 -0700
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106945
--- Comment #3 from anlauf at gcc dot gnu.org --- It is -fcheck=bounds that is required to trigger the failure. Replacing -ftrapv by -fsanitize=undefined produces the same error.