https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79257
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org, | |msebor at gcc dot gnu.org --- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> --- I think the reason is that the printf-return-length2 pass is scheduled very long after vrp1 and shortly before vrp2, optimizations in between those usually (ok, ccp is exception if it figured out something from non-zero bits) just preserve or invalidate the range info, but don't really create it. Here in particular ivopts pass creates new IVs which don't really have range info then. What is the reason for not putting the printf-return-length2 pass right after vrp2 or shortly after it, instead of shortly before it? Otherwise, we'd need to have some lightweight VRP pass (without assertion expression handling, without looping or only with limited looping, without other expensive stuff) scheduled in more places.