[Bug tree-optimization/90989] [9 Regression] incorrrect strlen result after second strcpy into the same destination
msebor at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Aug 2 16:57:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90989
--- Comment #7 from Martin Sebor <msebor at gcc dot gnu.org> ---
Author: msebor
Date: Fri Aug 2 16:57:19 2019
New Revision: 274021
URL: https://gcc.gnu.org/viewcvs?rev=274021&root=gcc&view=rev
Log:
Backport from mainline
PR tree-optimization/90989 - incorrrect strlen result after second strcpy
into the same destination
gcc/ChangeLog:
PR tree-optimization/90989
* tree-ssa-strlen.c (handle_char_store): Constrain a single character
optimization to just single character stores.
gcc/testsuite/ChangeLog:
PR tree-optimization/90989
* gcc.dg/strlenopt-26.c: Exit with test result status.
* gcc.dg/strlenopt-67.c: New test.
Added:
branches/gcc-9-branch/gcc/testsuite/gcc.dg/strlenopt-67.c
Modified:
branches/gcc-9-branch/gcc/ChangeLog
branches/gcc-9-branch/gcc/testsuite/ChangeLog
branches/gcc-9-branch/gcc/testsuite/gcc.dg/strlenopt-26.c
branches/gcc-9-branch/gcc/tree-ssa-strlen.c
More information about the Gcc-bugs
mailing list