From: Kazu Hirata Date: Sun, 6 Mar 2005 20:14:16 +0000 (+0000) Subject: * fold-const.c (fold_unary): Use build1 instead of copy_node. X-Git-Tag: misc/cutover-cvs2svn~5257 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c1a408fd50c0d395ae12033647364a82705708c7;p=thirdparty%2Fgcc.git * fold-const.c (fold_unary): Use build1 instead of copy_node. From-SVN: r95989 --- 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;