]> git.ipfire.org Git - thirdparty/gcc.git/commit
re PR tree-optimization/79800 (wrong snprintf result range with precision in a narrow...
authorMartin Sebor <msebor@redhat.com>
Wed, 15 Mar 2017 04:31:27 +0000 (04:31 +0000)
committerJeff Law <law@gcc.gnu.org>
Wed, 15 Mar 2017 04:31:27 +0000 (22:31 -0600)
commita983542b60dc245aa37ac57a643389e7b2021f28
treee75ecafa247efe6b929769f5d5da3ec40e64f3d9
parent76ca5f401d53091221b634f4e9774bc03dc8ffbe
re PR tree-optimization/79800 (wrong snprintf result range with precision in a narrow negative-positive range)

PR tree-optimization/79800
* gimple-ssa-sprintf.c (format_floating: Add argument.  Handle
precision in negative-positive range.
(format_floating): Call non-const overload with adjusted precision.

PR tree-optimization/79800
* gcc.dg/tree-ssa/builtin-sprintf-warn-15.c: Add test cases.
* gcc.dg/tree-ssa/pr79800.c: New test.

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