tree-ssa-ccp.c (get_symbol_constant_value): Strip all conversions.
authorRichard Guenther <rguenther@suse.de>
Fri, 5 Feb 2010 15:28:31 +0000 (15:28 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Fri, 5 Feb 2010 15:28:31 +0000 (15:28 +0000)
commit5c95f07b6154507f16f349d69f0aef23266c81ac
tree229795994b4de581bb95aae0ad647146d6c5a116
parent64aa00b1710aaf321a6487e1bb4e8a2e25b4aae9
tree-ssa-ccp.c (get_symbol_constant_value): Strip all conversions.

2010-02-05  Richard Guenther  <rguenther@suse.de>

* tree-ssa-ccp.c (get_symbol_constant_value): Strip all
conversions.
(fold_const_aggregate_ref): Likewise.
(ccp_fold_stmt): Substitute loads.
(maybe_fold_reference): Verify types before substituting.
Unshare properly.
(fold_gimple_assign): Unshare properly.
(fold_stmt_1): Insert conversion if necessary before replacing
the RHS.

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

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