builtins.c (expand_builtin_mathfn_2): Use tree_cons to build up the stabilized argume...
authorRoger Sayle <roger@eyesopen.com>
Mon, 23 Jun 2003 00:52:24 +0000 (00:52 +0000)
committerRoger Sayle <sayle@gcc.gnu.org>
Mon, 23 Jun 2003 00:52:24 +0000 (00:52 +0000)
commit8e0952f07501034235d2e961e828178279b260a2
tree1426ab031739ec03175dcc57750e3ad65651664e
parentfb87ad5d04fddc9eacaabc36360cfcc3978bcdee
builtins.c (expand_builtin_mathfn_2): Use tree_cons to build up the stabilized argument list, not build_tree_list.

* builtins.c (expand_builtin_mathfn_2): Use tree_cons to build
up the stabilized argument list, not build_tree_list.
(expand_builtin_strcpy): Construct new argument list manually
instead of using chainon to modify the original argument list.
(expand_builtin_stpcpy): Construct new argument list manually
instead of using copy_list and chainon.
(expand_builtin_sprintf): New function.  Optimize calls to
sprintf when the format is "%s" or doesn't contain a '%'.
(expand_builtin): Expand BUILT_IN_SPRINTF using the new function
expand_builtin_sprintf.

* gcc.c-torture/execute/string-opt-16.c: New test case.

From-SVN: r68355
gcc/ChangeLog
gcc/builtins.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/execute/string-opt-16.c [new file with mode: 0644]