2014-08-18 Richard Biener <rguenther@suse.de>
commit95e631b86f0f367b7cbb4ef744b238576885e587
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 18 Aug 2014 14:51:04 +0000 (18 14:51 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 18 Aug 2014 14:51:04 +0000 (18 14:51 +0000)
treebee237c22bc9fb7e476ab299631bf10e912e77cd
parent1bd2e4a08001b07ffaff2347a65c2d4f10682731
2014-08-18  Richard Biener  <rguenther@suse.de>

PR tree-optimization/62090
* builtins.c (fold_builtin_snprintf): Move to gimple-fold.c.
(fold_builtin_3): Do not fold snprintf.
(fold_builtin_4): Likewise.
* gimple-fold.c (gimple_fold_builtin_snprintf): New function
moved from builtins.c.
(gimple_fold_builtin_with_strlen): Fold snprintf and sprintf.
(gimple_fold_builtin): Do not fold sprintf here.

* gcc.dg/pr62090-2.c: New testcase.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@214105 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/builtins.c
gcc/gimple-fold.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr62090-2.c [new file with mode: 0644]