PR tree-optimization/90662 - strlen of a string in a vla plus offset not folded
authorMartin Sebor <msebor@redhat.com>
Wed, 12 Jun 2019 16:33:04 +0000 (16:33 +0000)
committerMartin Sebor <msebor@gcc.gnu.org>
Wed, 12 Jun 2019 16:33:04 +0000 (10:33 -0600)
commit7802a8ec9a03e6ced5b5d8f9018c6b9f45677c3f
tree38646c19e96f5ea0cbd1edfaeeec89e7c2000611
parent4b557bcc0d0674011a45ad259f44b9830289bd1f
PR tree-optimization/90662 - strlen of a string in a vla plus offset not folded

gcc/ChangeLog:

PR tree-optimization/90662
* tree-ssa-strlen.c (get_stridx): Handle simple VLAs and pointers
to arrays.

gcc/testsuite/ChangeLog:

PR tree-optimization/90662
* gcc.dg/strlenopt-62.c: New test.
* gcc.dg/strlenopt-63.c: New test.
* gcc.dg/strlenopt-64.c: New test.

From-SVN: r272197
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/strlenopt-62.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/strlenopt-63.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/strlenopt-64.c [new file with mode: 0644]
gcc/tree-ssa-strlen.c