diff options
author | Jan Hubicka <jh@suse.cz> | 2007-05-01 13:18:01 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2007-05-01 11:18:01 +0000 |
commit | fe9821b88c042f37973f4ab2866a52dcb676446c (patch) | |
tree | bd72595e8b02806708c943137cbe687e4482667d /gcc/fold-const.c | |
parent | 8b11009bad1b794283984fc806198e3cf29dbed3 (diff) | |
download | gcc-fe9821b88c042f37973f4ab2866a52dcb676446c.zip gcc-fe9821b88c042f37973f4ab2866a52dcb676446c.tar.gz gcc-fe9821b88c042f37973f4ab2866a52dcb676446c.tar.bz2 |
tree.h (maybe_fold_offset_to_component_ref): Remove.
* tree.h (maybe_fold_offset_to_component_ref): Remove.
(maybe_fold_offset_to_reference): Declare.
* fold-const.c (fold_unary): Do not fold
(type *)&A into &A->field_of_type_and_offset_0
* tree-ssa-ccp.c (maybe_fold_offset_to_array_ref): When base type
size is unknown, give up.
(maybe_fold_offset_to_component_ref): Ignore firelds with unknown
offsets.
(maybe_fold_offset_to_reference): New.
(maybe_fold_stmt_indirect): Use it.
(fold_stmt_r): Fold (type *)&A+offset into A->field_if_type_and_offset.
* gimplify.c (gimplify_conversion): Canonicalize conversions to
field references.
(gimplify_expr): Likewise for plus_expr.
From-SVN: r124323
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r-- | gcc/fold-const.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 7a8afcd..6311be7 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -7748,13 +7748,6 @@ fold_unary (enum tree_code code, tree type, tree op0) return fold_convert (type, build_fold_addr_expr (base)); } - /* Convert (type *)&A into &A->field_of_type_and_offset_0. */ - if (TREE_CODE (op0) == ADDR_EXPR && POINTER_TYPE_P (type) - && (tem = maybe_fold_offset_to_component_ref - (TREE_TYPE (TREE_OPERAND (op0, 0)), TREE_OPERAND (op0, 0), - integer_zero_node, TREE_TYPE (type), false))) - return build_fold_addr_expr_with_type (tem, type); - if ((TREE_CODE (op0) == MODIFY_EXPR || TREE_CODE (op0) == GIMPLE_MODIFY_STMT) && TREE_CONSTANT (GENERIC_TREE_OPERAND (op0, 1)) |