https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96317
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Use -fwrapv or unsigned integers as signed signed integer overflow is undefined. Use -fsanitizer=undefined will detect this at runtime.