https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91914
--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-9 branch has been updated by Martin Sebor <mse...@gcc.gnu.org>: https://gcc.gnu.org/g:176e7fa198dd50aca4c882c74fc8f4386a3f9131 commit r9-9501-g176e7fa198dd50aca4c882c74fc8f4386a3f9131 Author: Martin Sebor <mse...@redhat.com> Date: Mon May 3 18:10:03 2021 -0600 Minimal change to avoid incorrect strlen constant folding (PR 91914). gcc/ChangeLog: PR tree-optimization/91914 * expr.c (string_constant): Pass argument type to fold_ctor_reference to guide it. gcc/testsuite/ChangeLog: PR tree-optimization/91914 * gcc.dg/strlenopt-79.c: New test.