aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple-array-bounds.h
diff options
context:
space:
mode:
authorMartin Sebor <msebor@redhat.com>2022-02-03 13:27:16 -0700
committerMartin Sebor <msebor@redhat.com>2022-02-03 13:27:16 -0700
commit3c9f762ad02f398c27275688c3494332f69237f5 (patch)
treeecc309dacfde97c9940b401ccb9cc35f8fe1bdd0 /gcc/gimple-array-bounds.h
parent4e4252db0348a7274663a892c3a96d3ed7702aff (diff)
downloadgcc-3c9f762ad02f398c27275688c3494332f69237f5.zip
gcc-3c9f762ad02f398c27275688c3494332f69237f5.tar.gz
gcc-3c9f762ad02f398c27275688c3494332f69237f5.tar.bz2
Constrain conservative string lengths to array sizes [PR104119].
Resolves: PR tree-optimization/104119 - unexpected -Wformat-overflow after strlen in ILP32 since Ranger integration gcc/ChangeLog: PR tree-optimization/104119 * gimple-ssa-sprintf.cc (struct directive): Change argument type. (format_none): Same. (format_percent): Same. (format_integer): Same. (format_floating): Same. (get_string_length): Same. (format_character): Same. (format_string): Same. (format_plain): Same. (format_directive): Same. (compute_format_length): Same. (handle_printf_call): Same. * tree-ssa-strlen.cc (get_range_strlen_dynamic): Same. Call get_maxbound. (get_range_strlen_phi): Same. (get_maxbound): New function. (strlen_pass::get_len_or_size): Adjust to parameter change. * tree-ssa-strlen.h (get_range_strlen_dynamic): Change argument type. gcc/testsuite/ChangeLog: PR tree-optimization/104119 * gcc.dg/tree-ssa/builtin-snprintf-13.c: New test. * gcc.dg/tree-ssa/builtin-sprintf-warn-29.c: New test.
Diffstat (limited to 'gcc/gimple-array-bounds.h')
0 files changed, 0 insertions, 0 deletions