summaryrefslogtreecommitdiff
path: root/gcc/builtins.c
diff options
context:
space:
mode:
authorkazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4>2005-03-21 14:26:34 +0000
committerkazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4>2005-03-21 14:26:34 +0000
commit3d3d84b8f68497c6168c2127ef4ae12d5eececc0 (patch)
treedfc12d55d108e73ac977f2ac6bc5077c79d71b25 /gcc/builtins.c
parent0f284b75afbf6aeb00c2cd79ddd7e9dd3a7306b5 (diff)
downloadgcc-3d3d84b8f68497c6168c2127ef4ae12d5eececc0.tar.gz
* builtins.c (fold_builtin_1): Take decomposed arguments of
CALL_EXPR. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@96797 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/builtins.c')
-rw-r--r--gcc/builtins.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/gcc/builtins.c b/gcc/builtins.c
index a2b08f6d749..e326c15376b 100644
--- a/gcc/builtins.c
+++ b/gcc/builtins.c
@@ -178,7 +178,7 @@ static tree fold_builtin_fabs (tree, tree);
static tree fold_builtin_abs (tree, tree);
static tree fold_builtin_unordered_cmp (tree, tree, enum tree_code,
enum tree_code);
-static tree fold_builtin_1 (tree, bool);
+static tree fold_builtin_1 (tree, tree, bool);
static tree fold_builtin_strpbrk (tree, tree);
static tree fold_builtin_strstr (tree, tree);
@@ -7939,10 +7939,8 @@ fold_builtin_complex_div (tree type, tree arglist)
if no simplification was possible. */
static tree
-fold_builtin_1 (tree exp, bool ignore)
+fold_builtin_1 (tree fndecl, tree arglist, bool ignore)
{
- tree fndecl = get_callee_fndecl (exp);
- tree arglist = TREE_OPERAND (exp, 1);
tree type = TREE_TYPE (TREE_TYPE (fndecl));
enum built_in_function fcode;
@@ -8300,7 +8298,10 @@ fold_builtin_1 (tree exp, bool ignore)
tree
fold_builtin (tree exp, bool ignore)
{
- exp = fold_builtin_1 (exp, ignore);
+ tree fndecl = get_callee_fndecl (exp);
+ tree arglist = TREE_OPERAND (exp, 1);
+
+ exp = fold_builtin_1 (fndecl, arglist, ignore);
if (exp)
{
/* ??? Don't clobber shared nodes such as integer_zero_node. */