PR middle-end/79275 - -Wformat-overflow false positive exceeding INT_MAX in glibc...
authorMartin Sebor <msebor@redhat.com>
Fri, 3 Feb 2017 02:18:59 +0000 (02:18 +0000)
committerMartin Sebor <msebor@gcc.gnu.org>
Fri, 3 Feb 2017 02:18:59 +0000 (19:18 -0700)
commitebee1eb978f5168267f8ee9dc530f620d5639943
tree8d6cf5d91b0b93aaba4c736c8852ac2813fa9fe1
parent92d8bb06dc66c41c1b27906e680b79b12b2f51df
PR middle-end/79275 -  -Wformat-overflow false positive exceeding INT_MAX in glibc sysdeps/posix/tempname.c

gcc/testsuite/ChangeLog:

PR middle-end/79275
* gcc.dg/tree-ssa/builtin-sprintf-warn-11.c: New test.
* gcc.dg/tree-ssa/pr79275.c: New test.

gcc/ChangeLog:

PR middle-end/79275
* gimple-ssa-sprintf.c (get_string_length): Set lower bound to zero.
(format_string): Tighten up the range of output for non-constant
strings and correct the expected range for wide non-constant strings.

From-SVN: r245142
gcc/ChangeLog
gcc/gimple-ssa-sprintf.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-11.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/pr79275.c [new file with mode: 0644]