diff options
| author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-09-11 14:53:20 +0000 |
|---|---|---|
| committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-09-11 14:53:20 +0000 |
| commit | 83a99d39680ae22ff4d738742379cf81553a68f4 (patch) | |
| tree | 9c89799f44ae4d4e96a1e79f7af70fca2353d8c8 /gcc/fold-const.c | |
| parent | e31161b30aca84f8abb3216ed59a52b62bda13b9 (diff) | |
| download | ppe42-gcc-83a99d39680ae22ff4d738742379cf81553a68f4.tar.gz ppe42-gcc-83a99d39680ae22ff4d738742379cf81553a68f4.zip | |
2008-09-11 Richard Guenther <rguenther@suse.de>
* tree-vectorizer.c (slpeel_add_loop_guard): Fix types.
(set_prologue_iterations): Likewise.
* tree-vect-transform.c (vect_create_addr_base_for_vector_ref):
Likewise.
(vect_update_init_of_dr): Likewise.
* tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Fix
type verification.
* fold-const.c (fold_unary): Do not generate calculations
in sub-types.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@140291 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fold-const.c')
| -rw-r--r-- | gcc/fold-const.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c index aea7a653b18..2c822b561e2 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -7883,7 +7883,9 @@ fold_unary (enum tree_code code, tree type, tree op0) transformation effectively doesn't preserve non-maximal ranges. */ if (TREE_CODE (type) == INTEGER_TYPE && TREE_CODE (op0) == BIT_AND_EXPR - && TREE_CODE (TREE_OPERAND (op0, 1)) == INTEGER_CST) + && TREE_CODE (TREE_OPERAND (op0, 1)) == INTEGER_CST + /* Not if the conversion is to the sub-type. */ + && TREE_TYPE (type) != TREE_TYPE (op0)) { tree and = op0; tree and0 = TREE_OPERAND (and, 0), and1 = TREE_OPERAND (and, 1); |

