PR tree-optimization/87096 - Optimised snprintf is not POSIX conformant
authorMartin Sebor <msebor@redhat.com>
Fri, 14 Dec 2018 22:38:08 +0000 (22:38 +0000)
committerMartin Sebor <msebor@gcc.gnu.org>
Fri, 14 Dec 2018 22:38:08 +0000 (15:38 -0700)
commit3e6837c2a56f47c6b3156bbc12a9e89611412f83
tree1ebbcdd3b8bf5c101b8a55c558e45f3af4b6455a
parent92863013e5f487dc43d78228ad20757ee8f20d77
PR tree-optimization/87096 - Optimised snprintf is not POSIX conformant

gcc/ChangeLog:

PR rtl-optimization/87096
* gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Avoid
folding calls whose bound may exceed INT_MAX.  Diagnose bound ranges
that exceed the limit.

gcc/testsuite/ChangeLog:

PR tree-optimization/87096
* gcc.dg/tree-ssa/builtin-snprintf-4.c: New test.

From-SVN: r267157
gcc/ChangeLog
gcc/gimple-ssa-sprintf.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/tree-ssa/builtin-snprintf-4.c [new file with mode: 0644]