diff options
author | sayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-07-11 18:14:48 +0000 |
---|---|---|
committer | sayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-07-11 18:14:48 +0000 |
commit | db97ad4157917ee22e26683eac93acea1f2b8cea (patch) | |
tree | 8ae61f65db968c0c276e91209918fc11f50b63e4 /gcc/tree-ssa-ccp.c | |
parent | 504d3463155888e30ae12775390b578c7723a827 (diff) | |
download | ppe42-gcc-db97ad4157917ee22e26683eac93acea1f2b8cea.tar.gz ppe42-gcc-db97ad4157917ee22e26683eac93acea1f2b8cea.zip |
* builtins.c (fold_builtin_fputs): Don't bother converting the
return type to integer_type_node, as we've already checked that
the result will be ignored.
* tree-eh.c (tree_could_trap_p): Add support for -ftrapv such
that signed addition, subtraction, multiplication, division,
remainder, negation and absolute value may potentially trap.
* fold-const.c (fold_ignored_result): New function to strip
non-side-effecting tree nodes from an expression whose result
is ignored.
(fold_convert): Call fold_ignored_result when casting a value
to VOID_TYPE.
(omit_one_operand): Call fold_ignored_result on the "omitted"
operand when building a COMPOUND_EXPR.
(pedantic_omit_one_operand): Likewise.
* tree.h (fold_ignored_result): Prototype here.
* tree-ssa-ccp.c (ccp_fold_builtin): Call fold_ignored_result
when we're going to ignore the result.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@84525 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-ccp.c')
-rw-r--r-- | gcc/tree-ssa-ccp.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/gcc/tree-ssa-ccp.c b/gcc/tree-ssa-ccp.c index 5b6fca62653..7f28a9f9e93 100644 --- a/gcc/tree-ssa-ccp.c +++ b/gcc/tree-ssa-ccp.c @@ -2386,16 +2386,7 @@ ccp_fold_builtin (tree stmt, tree fn) } if (result && ignore) - { - /* STRIP_NOPS isn't strong enough -- it'll stop when we change modes, - but given that we're ignoring the result, we don't care what type - is being returned by the transformed function. */ - while (TREE_CODE (result) == NOP_EXPR - || TREE_CODE (result) == CONVERT_EXPR - || TREE_CODE (result) == NON_LVALUE_EXPR) - result = TREE_OPERAND (result, 0); - } - + result = fold_ignored_result (result); return result; } |