[Bug tree-optimization/90989] incorrrect strlen result after second strcpy into the same destination
msebor at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Jun 24 23:45:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90989
Martin Sebor <msebor at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Known to work| |8.3.0
Keywords| |wrong-code
Last reconfirmed| |2019-06-24
Assignee|unassigned at gcc dot gnu.org |msebor at gcc dot gnu.org
Blocks| |83819
Ever confirmed|0 |1
Known to fail| |10.0, 9.1.0
--- Comment #1 from Martin Sebor <msebor at gcc dot gnu.org> ---
The bug was introduced by my r263018:
PR tree-optimization/86043 - strlen after memcpy partially overwriting a string
not optimized
PR tree-optimization/86042 - missing strlen optimization after second strcpy
gcc/ChangeLog:
PR tree-optimization/86043
PR tree-optimization/86042
* tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
(get_string_cst_length): Rename...
(get_min_string_length): ...to this. Add argument.
(handle_char_store): Extend to handle multi-character stores by
MEM_REF.
* tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
* tree.h (initializer_zerop): Add argument.
Referenced Bugs:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83819
[Bug 83819] [meta-bug] missing strlen optimizations
More information about the Gcc-bugs
mailing list