https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89314
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Author: jakub Date: Thu Feb 14 10:04:35 2019 New Revision: 268870 URL: https://gcc.gnu.org/viewcvs?rev=268870&root=gcc&view=rev Log: PR tree-optimization/89314 * fold-const.c (fold_binary_loc): Cast strlen argument to const char * before dereferencing it. Formatting fixes. * gcc.dg/pr89314.c: New test. Added: branches/gcc-8-branch/gcc/testsuite/gcc.dg/pr89314.c Modified: branches/gcc-8-branch/gcc/ChangeLog branches/gcc-8-branch/gcc/fold-const.c branches/gcc-8-branch/gcc/testsuite/ChangeLog