https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127966
--- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-16 branch has been updated by Richard Biener <[email protected]>: https://gcc.gnu.org/g:38f7fcc5ebd4d7900b1c6ceff2955046c224f7c4 commit r16-9907-g38f7fcc5ebd4d7900b1c6ceff2955046c224f7c4 Author: Richard Biener <[email protected]> Date: Mon Oct 19 13:10:19 2026 +0200 tree-optimization/127966 - wrong niter with iteration over STRING_CST The following fixes a sign-extension issue with loop_niter_by_eval simulating an iteration over a STRING_CST by performing the compare in uint8_t type. PR tree-optimization/127966 * tree-ssa-loop-niter.cc (loop_niter_by_eval): Perform the comparison of the STRING_CST element with the terminating constant in uint8_t type. * gcc.dg/torture/pr127966.c: New testcase. (cherry picked from commit ac27d2e11708eb999fab1b26c053df4f3bd8fd0c)
