diff options
author | Kazu Hirata <kazu@cs.umass.edu> | 2005-03-21 14:26:34 +0000 |
---|---|---|
committer | Kazu Hirata <kazu@gcc.gnu.org> | 2005-03-21 14:26:34 +0000 |
commit | f399a1a18c45bb69e265c35b1693f6e1a9f7bc26 (patch) | |
tree | dfc12d55d108e73ac977f2ac6bc5077c79d71b25 | |
parent | d0f7abf932d8090cfd70d6c0234a54f7904ece14 (diff) | |
download | gcc-f399a1a18c45bb69e265c35b1693f6e1a9f7bc26.zip gcc-f399a1a18c45bb69e265c35b1693f6e1a9f7bc26.tar.gz gcc-f399a1a18c45bb69e265c35b1693f6e1a9f7bc26.tar.bz2 |
builtins.c (fold_builtin_1): Take decomposed arguments of CALL_EXPR.
* builtins.c (fold_builtin_1): Take decomposed arguments of
CALL_EXPR.
From-SVN: r96797
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/builtins.c | 11 |
2 files changed, 11 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2baf95e..5201ca4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2005-03-21 Kazu Hirata <kazu@cs.umass.edu> + + * builtins.c (fold_builtin_1): Take decomposed arguments of + CALL_EXPR. + 2005-03-21 Nathan Sidwell <nathan@codesourcery.com> PR other/20564 diff --git a/gcc/builtins.c b/gcc/builtins.c index a2b08f6..e326c15 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. */ |