https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89161
--- Comment #4 from Martin Sebor <msebor at gcc dot gnu.org> --- This should be resolved once the sprintf + strlen pass is converted to the new Ranger implementation sometime in the coming weeks (hopefully). In the meantime, changing the controlling expression in the if statement in the test case in comment #3 to (prec < sizeof buf - 10) should also help.