gimple-fold.c (get_range_strlen_tree): Record if the computed length is optimistic.
authorMartin Sebor <msebor@redhat.com>
Wed, 2 Jan 2019 06:17:54 +0000 (06:17 +0000)
committerJeff Law <law@gcc.gnu.org>
Wed, 2 Jan 2019 06:17:54 +0000 (23:17 -0700)
commiteef2da674ab7e8a9551e656e649359c2b27b026d
treef10d8250b17e84370021c55efc1683b25d2a446e
parent2667a5d04a4a34d901d592028d98aea694fca523
gimple-fold.c (get_range_strlen_tree): Record if the computed length is optimistic.

* gimple-fold.c (get_range_strlen_tree): Record if the computed
length is optimistic.  If it is, then arrange to compute the
conservative length as well.

* gcc.dg/strlenopt-40.c: Update
* gcc.dg/strlenopt-51.c: Likewise.
* gcc.dg/tree-ssa/pr79376.c: Likewise.

Co-Authored-By: Jeff Law <law@redhat.com>
From-SVN: r267505
gcc/ChangeLog
gcc/gimple-fold.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/strlenopt-40.c
gcc/testsuite/gcc.dg/strlenopt-51.c
gcc/testsuite/gcc.dg/tree-ssa/pr79376.c