aboutsummaryrefslogtreecommitdiff
path: root/gcc/fixed-value.c
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@linaro.org>2017-07-04 11:48:44 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2017-07-04 11:48:44 +0000
commit1aad71067c3ed227a9fce0e50c1818250eef6f92 (patch)
tree12020e076b3b67d0a74a4361ec63a0c71c1b88e3 /gcc/fixed-value.c
parent7c819e8ae28435601df531215419957814990cd5 (diff)
downloadgcc-1aad71067c3ed227a9fce0e50c1818250eef6f92.zip
gcc-1aad71067c3ed227a9fce0e50c1818250eef6f92.tar.gz
gcc-1aad71067c3ed227a9fce0e50c1818250eef6f92.tar.bz2
PR 81292: ICE on related strlens after r249880
r249880 installed the result of a strlen in a strinfo if the strinfo wasn't previously a full string. But as Jakub says in the PR comments, we can't just do that in isolation, because there are no vdefs on the call that would invalidate any related strinfos. This patch updates the related strinfos if the adjustment is simple and invalidates them otherwise. As elsewhere, we treat adjustments of the form strlen +/- INTEGER_CST as simple but anything else as too complex. 2017-07-04 Richard Sandiford <richard.sandiford@linaro.org> gcc/ PR tree-optimization/81292 * tree-ssa-strlen.c (handle_builtin_strlen): When setting full_string_p, also call adjust_related_strinfos if the adjustment is simple, otherwise invalidate related strinfos. gcc/testsuite/ PR tree-optimization/81292 * gcc.dg/pr81292-1.c: New test. * gcc.dg/pr81292-2.c: Likewise. From-SVN: r249961
Diffstat (limited to 'gcc/fixed-value.c')
0 files changed, 0 insertions, 0 deletions