PR tree-optimization/92683 - strncmp incorrect result with equal substrings and non...
authorMartin Sebor <msebor@redhat.com>
Tue, 26 Nov 2019 23:56:22 +0000 (23:56 +0000)
committerMartin Sebor <msebor@gcc.gnu.org>
Tue, 26 Nov 2019 23:56:22 +0000 (16:56 -0700)
commitd86d8b35ddec33371cf2efaa05dfeffe035babbe
tree0e6e859da945b4aa63f8da56da2c3774068d8e62
parente4c935cb98add40d0a6350a798a8258951dfc9d9
PR tree-optimization/92683 - strncmp incorrect result with equal substrings and non-const bound

gcc/testsuite/ChangeLog:

PR tree-optimization/92683
* gcc.dg/strcmpopt_8.c: New test.
* gcc.dg/strcmpopt_9.c: New test.

gcc/ChangeLog:

PR tree-optimization/92683
* gimple-fold.c (gimple_fold_builtin_string_compare): Restore a test
inadvertently removed in a previous change.  Rename local variable
for clarity.

From-SVN: r278742
gcc/ChangeLog
gcc/gimple-fold.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/strcmpopt_8.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/strcmpopt_9.c [new file with mode: 0644]