diff options
author | Richard Guenther <rguenther@suse.de> | 2007-09-04 08:38:56 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2007-09-04 08:38:56 +0000 |
commit | 04d86531d7cf2080903ea85d27d79daa944828fb (patch) | |
tree | 333af519eb1ef7bdaff0a09aeb9d6248eee3cef5 /gcc/tree-ssa-ccp.c | |
parent | fc7a6a0dfa65af07a199aa34823d81800ec35f64 (diff) | |
download | gcc-04d86531d7cf2080903ea85d27d79daa944828fb.zip gcc-04d86531d7cf2080903ea85d27d79daa944828fb.tar.gz gcc-04d86531d7cf2080903ea85d27d79daa944828fb.tar.bz2 |
re PR tree-optimization/33291 (a+=2; a+=2 not simplified to a+=4; with -O3 (ok with gcc-4.2.1))
2007-09-04 Richard Guenther <rguenther@suse.de>
PR tree-optimization/33291
* tree-pretty-print.c (dump_generic_node): Dump all
qualifiers for pointer types, not only first. Dump
qualifiers for aggregate types as well.
* tree-ssa-ccp.c (maybe_fold_offset_to_array_ref): Always
use the canonical type for building ARRAY_REFs.
* gimplify.c (canonicalize_addr_expr): Clean up. The
correct validness check is compatibility of the pointer
types. Always use the canonical type for building
ARRAY_REFs and ADDR_EXPRs.
* tree-ssa-forwprop.c (forward_propagate_addr_expr): Revert
change that disabled propagation of ADDR_EXPRs into statements
with volatile ops.
* gcc.dg/volatile2.c: New testcase.
* gcc.dg/pr32721.c: Adjust volatile reference pattern.
* gcc.dg/tree-ssa/forwprop-1.c: Remove xfail.
* gcc.dg/tree-ssa/forwprop-2.c: Likewise.
* gcc.dg/tree-ssa/pr17141-1.c: Likewise.
From-SVN: r128068
Diffstat (limited to 'gcc/tree-ssa-ccp.c')
-rw-r--r-- | gcc/tree-ssa-ccp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/tree-ssa-ccp.c b/gcc/tree-ssa-ccp.c index e0829f5..05a65f6 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); } |