PR middle-end/80364 - sanitizer detects signed integer overflow in gimple-ssa-sprintf.c
authorMartin Sebor <msebor@redhat.com>
Tue, 11 Apr 2017 16:35:34 +0000 (16:35 +0000)
committerMartin Sebor <msebor@gcc.gnu.org>
Tue, 11 Apr 2017 16:35:34 +0000 (10:35 -0600)
commit3812f460464251b944255065422bd2755efad659
tree17927665a105191963a2ff79345d192d5106c03e
parentb1c0468f72b1f155419a5cb648609a03f2c37d2d
PR middle-end/80364 - sanitizer detects signed integer overflow in gimple-ssa-sprintf.c

gcc/ChangeLog:
PR middle-end/80364
* gimple-ssa-sprintf.c (get_int_range): Remove second argument and
always use the int type.  Use INTEGRAL_TYPE_P() rather than testing
for INTEGER_TYPE.
(directive::set_width, directive::set_precision, format_character):
Adjust.
(parse_directive): Use INTEGRAL_TYPE_P() rather than testing for
INTEGER_TYPE.

gcc/testsuite/ChangeLog:
PR middle-end/80364
* gcc.dg/tree-ssa/builtin-sprintf-warn-16.c: New test.

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