summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-ccp.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-ssa-ccp.c')
-rw-r--r--gcc/tree-ssa-ccp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/tree-ssa-ccp.c b/gcc/tree-ssa-ccp.c
index e0829f59917..05a65f6e093 100644
--- a/gcc/tree-ssa-ccp.c
+++ b/gcc/tree-ssa-ccp.c
@@ -1644,7 +1644,7 @@ maybe_fold_offset_to_array_ref (tree base, tree offset, tree orig_type)
/* Make sure to possibly truncate late after offsetting. */
idx = fold_convert (idx_type, idx);
- return build4 (ARRAY_REF, orig_type, base, idx, NULL_TREE, NULL_TREE);
+ return build4 (ARRAY_REF, elt_type, base, idx, NULL_TREE, NULL_TREE);
}