https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125079
--- Comment #8 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-16 branch has been updated by Jakub Jelinek <[email protected]>: https://gcc.gnu.org/g:3cf5f99accf999b26896fff9cdd1e1d6a9b4ad2d commit r16-8859-g3cf5f99accf999b26896fff9cdd1e1d6a9b4ad2d Author: Jakub Jelinek <[email protected]> Date: Sat May 2 10:37:04 2026 +0200 strlen: Fix up backport [PR125079] My r16-8848 backport of r17-251 broke some __strcat_chk optimizations. The problem is that GCC 16 branch differs from the trunk since r17-82, on the trunk lenstmt is really the call stmt and r17-251 then asks for the call lhs of that, but before r17-82 lenstmt has been resued for the subsequent gimple assign and so objsz is NULL_TREE. Fixed thusly. 2026-05-02 Jakub Jelinek <[email protected]> PR tree-optimization/125079 * tree-ssa-strlen.cc (get_string_length): Don't overwrite lenstmt variable with another stmt.
