PR tree-optimization/91567 - Spurious -Wformat-overflow warnings building glibc ...
authorMartin Sebor <msebor@redhat.com>
Tue, 27 Aug 2019 23:31:44 +0000 (23:31 +0000)
committerMartin Sebor <msebor@gcc.gnu.org>
Tue, 27 Aug 2019 23:31:44 +0000 (17:31 -0600)
commit407b92bcfb34f352b6aad7b629bf365c02114469
treeaae733d110df9ec932c4b6e87ca9b79a1ae4305b
parent2d8ba44101028f4be534a20a0d2146695e1dc4fd
PR tree-optimization/91567 - Spurious -Wformat-overflow warnings building glibc (32-bit only)

gcc/ChangeLog:

PR tree-optimization/91567
* gimple-ssa-sprintf.c (get_string_length): Handle more forms of lengths
of unknown strings.
* vr-values.c (vr_values::extract_range_basic): Set strlen upper bound
to PTRDIFF_MAX - 2.

gcc/testsuite/ChangeLog:

PR tree-optimization/91567
* gcc.dg/tree-ssa/builtin-snprintf-6.c: Xfail a subset of assertions
on targets other than x86_64 to work around PR 83543.
* gcc.dg/tree-ssa/builtin-sprintf-warn-22.c: New test.

From-SVN: r274976
gcc/ChangeLog
gcc/gimple-ssa-sprintf.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/tree-ssa/builtin-snprintf-6.c
gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-22.c [new file with mode: 0644]
gcc/vr-values.c