diff options
author | kazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-09-22 18:02:08 +0000 |
---|---|---|
committer | kazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-09-22 18:02:08 +0000 |
commit | c8e36e552f78eb3e2449f06e4ae1409f48422dda (patch) | |
tree | 9b217f4e713dd67beaf547cca130461eff1ca273 /gcc/convert.c | |
parent | df49acff52222b5269449717978301edf1765aa9 (diff) | |
download | gcc-c8e36e552f78eb3e2449f06e4ae1409f48422dda.tar.gz |
PR tree-optimization/17512
* convert.c (convert_to_integer): Don't handle TRUTH_*_EXPR as
special cases.
* testsuite/gcc.c-torture/compile/20040916-1.c.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87870 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/convert.c')
-rw-r--r-- | gcc/convert.c | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/gcc/convert.c b/gcc/convert.c index d9c0c129d7c..005d3e2089b 100644 --- a/gcc/convert.c +++ b/gcc/convert.c @@ -397,9 +397,7 @@ convert_to_integer (tree type, tree expr) case BOOLEAN_TYPE: case CHAR_TYPE: /* If this is a logical operation, which just returns 0 or 1, we can - change the type of the expression. For some logical operations, - we must also change the types of the operands to maintain type - correctness. */ + change the type of the expression. */ if (TREE_CODE_CLASS (ex_form) == tcc_comparison) { @@ -408,25 +406,6 @@ convert_to_integer (tree type, tree expr) return expr; } - else if (ex_form == TRUTH_AND_EXPR || ex_form == TRUTH_ANDIF_EXPR - || ex_form == TRUTH_OR_EXPR || ex_form == TRUTH_ORIF_EXPR - || ex_form == TRUTH_XOR_EXPR) - { - expr = copy_node (expr); - TREE_OPERAND (expr, 0) = convert (type, TREE_OPERAND (expr, 0)); - TREE_OPERAND (expr, 1) = convert (type, TREE_OPERAND (expr, 1)); - TREE_TYPE (expr) = type; - return expr; - } - - else if (ex_form == TRUTH_NOT_EXPR) - { - expr = copy_node (expr); - TREE_OPERAND (expr, 0) = convert (type, TREE_OPERAND (expr, 0)); - TREE_TYPE (expr) = type; - return expr; - } - /* If we are widening the type, put in an explicit conversion. Similarly if we are not changing the width. After this, we know we are truncating EXPR. */ |