PR tree-optimization/86083 - handle non-constant assignments in strlen
authorMartin Sebor <msebor@redhat.com>
Mon, 11 Jun 2018 20:01:40 +0000 (20:01 +0000)
committerMartin Sebor <msebor@gcc.gnu.org>
Mon, 11 Jun 2018 20:01:40 +0000 (14:01 -0600)
commit223c63e62ab44cb36102758dffd5ac8c9ab63bb1
treec2cf4657e86b6d834d4725d513d683dbc6e29638
parent87cbbc45a950f382853e2e4cf494cdfab62f0e5b
PR tree-optimization/86083 - handle non-constant assignments in strlen

gcc/ChangeLog:

PR tree-optimization/86083
* tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.

gcc/testsuite/ChangeLog:

PR tree-optimization/86083
* gcc.dg/strlenopt-44.c: New test.

From-SVN: r261452
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/strlenopt-44.c [new file with mode: 0644]
gcc/tree-ssa-strlen.c