diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2004-11-04 20:11:13 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@de.ibm.com> | 2004-11-04 20:11:13 +0000 |
commit | 43fb2d95e6e417a49acc65c7c62dbe3a9ed9c76b (patch) | |
tree | 0db24bfe2b9a4c70fca52c98ad9f0fd1dd54004d /gcc/cp/cp-objcp-common.c | |
parent | ee21fececda20cab0d664cc42173f064a394f793 (diff) |
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.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@90078 138bc75d-0d04-0410-961f-82ee72b054a4
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 a58549b7326..9938b98f535 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; |