https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78586
--- Comment #13 from Jakub Jelinek <jakub at gcc dot gnu.org> --- (In reply to Martin Sebor from comment #11) > PR tree-optimization/78586 > * gcc.dg/tree-ssa/builtin-sprintf-2.c: New test cases. > > > Modified: > trunk/gcc/testsuite/ChangeLog > trunk/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-2.c RNG (4, 4, 32, "%lu", (unsigned)u) Isn't this UB? Did you mean (unsigned long)u) ? As for closing this PR, I have no problem with that, just remember that PR78622 doesn't cover all the issues discussed here and still unresolved.