https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103961
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> --- There is a bogus warning too: cap_text.c:431:11: warning: '%c' directive writing 1 byte into a region of size 0 [-Wformat-overflow=] In file included from /usr/include/stdio.h:894, from cap_text.c:13: In function 'sprintf', inlined from 'cap_to_text' at cap_text.c:431:11: /usr/include/bits/stdio2.h:38:10: note: '__builtin___sprintf_chk' output between 2 and 5 bytes into a destination of size 0 And the gimple looks wrong: _164 = __sprintf_chkD.1304 (p_141, 1, 0, [cap_text.c:431:11] "%c%s%s%s", _31, iftmp.56_86, iftmp.55_85, iftmp.54_84); For GCC 11 we had: _164 = __sprintf_chkD.1270 (p_141, 1, 18446744073709551615, [cap_text.c:431:11] "%c%s%s%s", _33, iftmp.56_90, iftmp.55_89, iftmp.54_88);