https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79373
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> --- Use -fwrapv if you want predictable behaviour from integer overflow (both that and -fsanitize=undefined are mentioned at https://gcc.gnu.org/bugs)