diff options
author | Kazu Hirata <kazu@cs.umass.edu> | 2005-03-06 20:14:16 +0000 |
---|---|---|
committer | Kazu Hirata <kazu@gcc.gnu.org> | 2005-03-06 20:14:16 +0000 |
commit | c1a408fd50c0d395ae12033647364a82705708c7 (patch) | |
tree | e2ef27525027b25a686ee926a7b08b2f1aeccb74 | |
parent | f00822b28d0c1d075ac008fc7eadef4f3b269ab5 (diff) | |
download | gcc-c1a408fd50c0d395ae12033647364a82705708c7.zip gcc-c1a408fd50c0d395ae12033647364a82705708c7.tar.gz gcc-c1a408fd50c0d395ae12033647364a82705708c7.tar.bz2 |
* fold-const.c (fold_unary): Use build1 instead of copy_node.
From-SVN: r95989
-rw-r--r-- | gcc/ChangeLog | 2 | ||||
-rw-r--r-- | gcc/fold-const.c | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 106e3f2..9c91bbc 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -4,6 +4,8 @@ * cse.c (cse_reg_info_table): Make it static. + * fold-const.c (fold_unary): Use build1 instead of copy_node. + 2005-03-06 Zdenek Dvorak <dvorakz@suse.cz> * cse.c (find_best_addr): Use canon_for_address. diff --git a/gcc/fold-const.c b/gcc/fold-const.c index d7d2358..1cab3fe 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -6808,8 +6808,7 @@ fold_unary (tree expr) { /* Don't leave an assignment inside a conversion unless assigning a bitfield. */ - tem = copy_node (t); - TREE_OPERAND (tem, 0) = TREE_OPERAND (op0, 1); + tem = build1 (code, type, TREE_OPERAND (op0, 1)); /* First do the assignment, then return converted constant. */ tem = build2 (COMPOUND_EXPR, TREE_TYPE (tem), op0, fold (tem)); TREE_NO_WARNING (tem) = 1; |