summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-ccp.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2007-04-12 09:15:53 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2007-04-12 09:15:53 +0000
commita25016102c6c1bfc372de639e5ba0d42eb2a3f9f (patch)
tree03bea213dba9cc1181e65e0dcad9f2ea2208af80 /gcc/tree-ssa-ccp.c
parente14bee04a2b3177bacc5a1973cf025e2d46e2926 (diff)
downloadgcc-a25016102c6c1bfc372de639e5ba0d42eb2a3f9f.tar.gz
2007-04-12 Richard Guenther <rguenther@suse.de>
PR tree-optimization/24689 PR tree-optimization/31307 * fold-const.c (operand_equal_p): Compare INTEGER_CST array indices by value. * gimplify.c (canonicalize_addr_expr): To be consistent with gimplify_compound_lval only set operands two and three of ARRAY_REFs if they are not gimple_min_invariant. This makes it never at this place. * tree-ssa-ccp.c (maybe_fold_offset_to_array_ref): Likewise. * g++.dg/tree-ssa/pr31307.C: New testcase. * gcc.dg/tree-ssa/pr24689.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@123736 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-ccp.c')
-rw-r--r--gcc/tree-ssa-ccp.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/gcc/tree-ssa-ccp.c b/gcc/tree-ssa-ccp.c
index 8e4d88ca457..530dee01a09 100644
--- a/gcc/tree-ssa-ccp.c
+++ b/gcc/tree-ssa-ccp.c
@@ -1632,9 +1632,7 @@ maybe_fold_offset_to_array_ref (tree base, tree offset, tree orig_type)
if (!integer_zerop (elt_offset))
idx = int_const_binop (PLUS_EXPR, idx, elt_offset, 0);
- return build4 (ARRAY_REF, orig_type, base, idx, min_idx,
- size_int (tree_low_cst (elt_size, 1)
- / (TYPE_ALIGN_UNIT (elt_type))));
+ return build4 (ARRAY_REF, orig_type, base, idx, NULL_TREE, NULL_TREE);
}