diff options
author | Jakub Jelinek <jakub@redhat.com> | 2019-02-26 21:36:29 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2019-02-26 21:36:29 +0100 |
commit | 9bc83f27a703bd7d2393638e0ef93f506ac8bb03 (patch) | |
tree | 7312fc231be96058723ceb7b696e739b968d5eda /gcc/tree.c | |
parent | 3d7beb79e0631c7ca8532c497295af03822eeed2 (diff) | |
download | gcc-9bc83f27a703bd7d2393638e0ef93f506ac8bb03.zip gcc-9bc83f27a703bd7d2393638e0ef93f506ac8bb03.tar.gz gcc-9bc83f27a703bd7d2393638e0ef93f506ac8bb03.tar.bz2 |
re PR tree-optimization/89500 (ICE: tree check: expected integer_cst, have ssa_name in get_len, at tree.h:5653)
PR tree-optimization/89500
* tree-ssa-strlen.c (stridx_strlenloc): Adjust comment.
(handle_builtin_strlen): Remove noncst_bound variable. Always
optimize strnlen (x, 0) to 0. Optimize strnlen (x, cst) to
cst if the first cst bytes starting at x are known to be non-zero,
even if the string is not zero terminated. Don't try to modify
*si for strnlen. Update strlen_to_stridx only for strlen or if
we can prove strnlen returns the same value as strlen would.
* gcc.dg/pr89500.c: New test.
* gcc.dg/Wstringop-overflow-10.c: New test.
* gcc.dg/strlenopt-60.c: New test.
From-SVN: r269230
Diffstat (limited to 'gcc/tree.c')
0 files changed, 0 insertions, 0 deletions