tree-ssa-ccp.c (ccp_fold): Also read from constant values and fold constant aggregate...
authorRichard Guenther <rguenther@suse.de>
Sat, 15 Mar 2008 18:22:26 +0000 (18:22 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Sat, 15 Mar 2008 18:22:26 +0000 (18:22 +0000)
commit87e1e42b707bfc714a970c912da511bce72cfdb7
tree91d6796e36eb2d8677834e63073b7541cc505389
parent107276837fb7b50449dc3f1a5ad3d48c82661094
tree-ssa-ccp.c (ccp_fold): Also read from constant values and fold constant aggregate refs.

2008-03-15  Richard Guenther  <rguenther@suse.de>

* tree-ssa-ccp.c (ccp_fold): Also read from constant values
and fold constant aggregate refs.
(fold_const_aggregate_ref): Handle string constants
and constructors in ARRAY_REFs.  Handle INDIRECT_REF.
(evaluate_stmt): Simplify now that ccp_fold folds constant
aggregate refs.

* gcc.dg/tree-ssa/ssa-ccp-16.c: New testcase.

From-SVN: r133257
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-16.c [new file with mode: 0644]
gcc/tree-ssa-ccp.c