diff options
author | Volker Reichelt <reichelt@igpm.rwth-aachen.de> | 2005-08-16 12:14:10 +0000 |
---|---|---|
committer | Volker Reichelt <reichelt@gcc.gnu.org> | 2005-08-16 12:14:10 +0000 |
commit | 543e2cc3e46b6e5abe33eac1b4f591cfebfa6ed8 (patch) | |
tree | f1b21523f1f783dce881cffb68af0c2a38ac5235 | |
parent | 28f52a4d8eb0703eadd9eb19df729c69a6b5cd23 (diff) | |
download | gcc-543e2cc3e46b6e5abe33eac1b4f591cfebfa6ed8.tar.gz |
builtins.c (expand_builtin_strcat): Remove superfluous call to fold.
* builtins.c (expand_builtin_strcat): Remove superfluous call to fold.
(fold_builtin_isdigit): Use fold_buildN.
(build_function_call_expr): Likewise.
* c-typeck.c (c_finish_loop): Likewise.
From-SVN: r103154
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/builtins.c | 13 | ||||
-rw-r--r-- | gcc/c-typeck.c | 3 |
3 files changed, 13 insertions, 10 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9d613e4c676..9614c472f9f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2005-08-16 Volker Reichelt <reichelt@igpm.rwth-aachen.de> + + * builtins.c (expand_builtin_strcat): Remove superfluous call to fold. + (fold_builtin_isdigit): Use fold_buildN. + (build_function_call_expr): Likewise. + * c-typeck.c (c_finish_loop): Likewise. + 2005-08-16 J"orn Rennecke <joern.rennecke@st.com> Richard Shann <rshann@superh.com> diff --git a/gcc/builtins.c b/gcc/builtins.c index bd187c18356..13d80ed53dc 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -3860,9 +3860,8 @@ expand_builtin_strcat (tree arglist, tree type, rtx target, enum machine_mode mo /* Create strlen (dst). */ newdst = - fold (build_function_call_expr (strlen_fn, - build_tree_list (NULL_TREE, - dst))); + build_function_call_expr (strlen_fn, + build_tree_list (NULL_TREE, dst)); /* Create (dst + (cast) strlen (dst)). */ newdst = fold_convert (TREE_TYPE (dst), newdst); newdst = fold_build2 (PLUS_EXPR, TREE_TYPE (dst), dst, newdst); @@ -8291,9 +8290,8 @@ fold_builtin_isdigit (tree arglist) arg = fold_convert (unsigned_type_node, TREE_VALUE (arglist)); arg = build2 (MINUS_EXPR, unsigned_type_node, arg, build_int_cst (unsigned_type_node, target_digit0)); - arg = build2 (LE_EXPR, integer_type_node, arg, - build_int_cst (unsigned_type_node, 9)); - arg = fold (arg); + arg = fold_build2 (LE_EXPR, integer_type_node, arg, + build_int_cst (unsigned_type_node, 9)); if (in_gimple_form && !TREE_CONSTANT (arg)) return NULL_TREE; else @@ -8929,9 +8927,8 @@ build_function_call_expr (tree fn, tree arglist) tree call_expr; call_expr = build1 (ADDR_EXPR, build_pointer_type (TREE_TYPE (fn)), fn); - call_expr = build3 (CALL_EXPR, TREE_TYPE (TREE_TYPE (fn)), + return fold_build3 (CALL_EXPR, TREE_TYPE (TREE_TYPE (fn)), call_expr, arglist, NULL_TREE); - return fold (call_expr); } /* This function validates the types of a function call argument list diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c index 29d90675a71..39f682229a5 100644 --- a/gcc/c-typeck.c +++ b/gcc/c-typeck.c @@ -7086,8 +7086,7 @@ c_finish_loop (location_t start_locus, tree cond, tree incr, tree body, } t = build_and_jump (&blab); - exit = build3 (COND_EXPR, void_type_node, cond, exit, t); - exit = fold (exit); + exit = fold_build3 (COND_EXPR, void_type_node, cond, exit, t); if (cond_is_first) SET_EXPR_LOCATION (exit, start_locus); else |