diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2004-11-04 20:11:13 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@gcc.gnu.org> | 2004-11-04 20:11:13 +0000 |
commit | 106f5de5a5069c016b6e2c1929ffe217bf9a3c84 (patch) | |
tree | 0db24bfe2b9a4c70fca52c98ad9f0fd1dd54004d /gcc/cp/cp-objcp-common.c | |
parent | ac8b3d9d72d430fb12d78f51938eb57cfa860754 (diff) | |
download | gcc-106f5de5a5069c016b6e2c1929ffe217bf9a3c84.zip gcc-106f5de5a5069c016b6e2c1929ffe217bf9a3c84.tar.gz gcc-106f5de5a5069c016b6e2c1929ffe217bf9a3c84.tar.bz2 |
re PR tree-optimization/18184 (Tree optimizers ignore pointer modes)
ChangeLog:
PR tree-optimization/18184
* c-typeck.c (comptypes): Do not treat pointers of different
modes or alias-all flags as equivalent.
* tree-ssa.c (tree_ssa_useless_type_conversion_1): Likewise.
cp/ChangeLog:
PR tree-optimization/18184
* cp-objcp-common.c (cxx_types_compatible_p): Do not treat pointers
of different modes or alias-all flags as equivalent.
* typeck.c (comptypes): Likewise.
From-SVN: r90078
Diffstat (limited to 'gcc/cp/cp-objcp-common.c')
-rw-r--r-- | gcc/cp/cp-objcp-common.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/cp/cp-objcp-common.c b/gcc/cp/cp-objcp-common.c index a58549b..9938b98 100644 --- a/gcc/cp/cp-objcp-common.c +++ b/gcc/cp/cp-objcp-common.c @@ -162,6 +162,8 @@ cxx_types_compatible_p (tree x, tree y) interchangeable. FIXME should we try to replace all references with pointers? */ if (POINTER_TYPE_P (x) && POINTER_TYPE_P (y) + && TYPE_MODE (x) == TYPE_MODE (y) + && TYPE_REF_CAN_ALIAS_ALL (x) == TYPE_REF_CAN_ALIAS_ALL (y) && same_type_p (TREE_TYPE (x), TREE_TYPE (y))) return 1; |