https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107919
--- Comment #1 from Freddie Chopin <freddie_chopin at op dot pl> --- More possibly imporant notes: 1. The warning appears only with -O1 or -O2, with 0, s, g or 3 the warning is gone. 2. Adding -fsanitize=undefined to compiler invocation makes the warning go away as well - no terminal output is produced in that case.