diff options
author | Richard Guenther <rguenther@suse.de> | 2008-03-20 22:06:40 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2008-03-20 22:06:40 +0000 |
commit | 16ac8575504420eb56680d82edbd6c8879a67faf (patch) | |
tree | bd5e138f1c805a2f582aec0ad63aaaa70c10283c /gcc/tree-ssa.c | |
parent | 44b6c5465840c7cd4737c0a0bc434c38dfa4eca4 (diff) | |
download | gcc-16ac8575504420eb56680d82edbd6c8879a67faf.zip gcc-16ac8575504420eb56680d82edbd6c8879a67faf.tar.gz gcc-16ac8575504420eb56680d82edbd6c8879a67faf.tar.bz2 |
tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Remove special casing of constant qualifiers.
2008-03-20 Richard Guenther <rguenther@suse.de>
* tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Remove
special casing of constant qualifiers.
* tree-ssa.c (useless_type_conversion_p_1): Instead do not
care about them in general.
* tree-ssa-ccp.c (ccp_fold): Addresses are constant or not
regardless of their type.
(fold_stmt_r): Forcefully fold *& if we end up with that.
* gcc.dg/tree-ssa/ssa-ccp-17.c: New testcase.
From-SVN: r133400
Diffstat (limited to 'gcc/tree-ssa.c')
-rw-r--r-- | gcc/tree-ssa.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/gcc/tree-ssa.c b/gcc/tree-ssa.c index 128b4e8..f7306b1 100644 --- a/gcc/tree-ssa.c +++ b/gcc/tree-ssa.c @@ -1117,12 +1117,8 @@ useless_type_conversion_p_1 (tree outer_type, tree inner_type) != get_alias_set (TREE_TYPE (outer_type)))) return false; - /* Do not lose casts from const qualified to non-const - qualified. */ - if ((TYPE_READONLY (TREE_TYPE (outer_type)) - != TYPE_READONLY (TREE_TYPE (inner_type))) - && TYPE_READONLY (TREE_TYPE (inner_type))) - return false; + /* We do not care for const qualification of the pointed-to types + as const qualification has no semantic value to the middle-end. */ /* Do not lose casts to restrict qualified pointers. */ if ((TYPE_RESTRICT (outer_type) |