PR tree-optimization/92157 - incorrect strcmp() == 0 result for unknown strings
authorMartin Sebor <msebor@redhat.com>
Fri, 18 Oct 2019 22:26:39 +0000 (22:26 +0000)
committerMartin Sebor <msebor@gcc.gnu.org>
Fri, 18 Oct 2019 22:26:39 +0000 (16:26 -0600)
commit9c233ad0cb1b31ed305c3534e3d9279e5af43477
treee9f7c5dce019404c15ccc589c01af1b2b26ae813
parentf8b9b1edef77be79b3f98021f9d1f24a1e986ffd
PR tree-optimization/92157 - incorrect strcmp() == 0 result for unknown strings

gcc/testsuite/ChangeLog:

PR tree-optimization/92157
* gcc.dg/strlenopt-69.c: Disable test failing due to PR 92155.
* gcc.dg/strlenopt-87.c: New test.

gcc/ChangeLog:

PR tree-optimization/92157
* tree-ssa-strlen.c (handle_builtin_string_cmp): Be prepared for
compute_string_length to return a negative result.

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