From: kazu Date: Sun, 6 Mar 2005 20:14:16 +0000 (+0000) Subject: * fold-const.c (fold_unary): Use build1 instead of copy_node. X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=baa302ea85899c146c5316c10c2ba5b979a9e039;p=thirdparty%2Fgcc.git * fold-const.c (fold_unary): Use build1 instead of copy_node. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@95989 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 106e3f2097dc..9c91bbc34f0c 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 * cse.c (find_best_addr): Use canon_for_address. diff --git a/gcc/fold-const.c b/gcc/fold-const.c index d7d23582599a..1cab3fea43a1 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;