This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[Committed] Remove dead code from fold_builtin_copysign
- From: Roger Sayle <roger at eyesopen dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Dan Nicolaescu <dann at ics dot uci dot edu>
- Date: Wed, 1 Mar 2006 14:34:59 -0700 (MST)
- Subject: [Committed] Remove dead code from fold_builtin_copysign
The following patch removes an unreachable statement (after a
return) from fold_builtin_copysign, spotted by Dan Nicolaescu.
The following patch has been tested on x86_64-unknown-linux-gnu with
a full "make bootstrap", all default languages, and regression tested
with a top-level "make -k check" with no new failures.
Committed to mainline as revision 111615.
2006-03-01 Roger Sayle <roger@eyesopen.com>
* builtins.c (fold_builtin_copysign): Delete unreachable code.
Index: builtins.c
===================================================================
*** builtins.c (revision 111486)
--- builtins.c (working copy)
*************** fold_builtin_copysign (tree fndecl, tree
*** 8208,8216 ****
c1 = TREE_REAL_CST (arg1);
c2 = TREE_REAL_CST (arg2);
real_copysign (&c1, &c2);
return build_real (type, c1);
- c1.sign = c2.sign;
}
/* copysign(X, Y) is fabs(X) when Y is always non-negative.
--- 8208,8216 ----
c1 = TREE_REAL_CST (arg1);
c2 = TREE_REAL_CST (arg2);
+ /* c1.sign := c2.sign. */
real_copysign (&c1, &c2);
return build_real (type, c1);
}
/* copysign(X, Y) is fabs(X) when Y is always non-negative.
Roger
--