diff options
| author | Richard Guenther <rguenther@suse.de> | 2006-07-05 10:54:17 +0000 |
|---|---|---|
| committer | Richard Biener <rguenth@gcc.gnu.org> | 2006-07-05 10:54:17 +0000 |
| commit | 09b868558b4beffb64f04223ffb981d92052b53e (patch) | |
| tree | e368e3fa103fb7e3f8554ee770014694170aa611 /gcc/cp/cp-objcp-common.c | |
| parent | d898f3ce60f2ae73fe484386ffc1916160d6fd61 (diff) | |
| download | gcc-09b868558b4beffb64f04223ffb981d92052b53e.zip gcc-09b868558b4beffb64f04223ffb981d92052b53e.tar.gz gcc-09b868558b4beffb64f04223ffb981d92052b53e.tar.bz2 | |
re PR middle-end/27084 (Does not propagate memory load base through useless type conversion)
2006-07-05 Richard Guenther <rguenther@suse.de>
Andrew Pinski <pinskia@gcc.gnu.org>
PR c++/27084
* cp-objcp-common.c (cxx_types_compatible_p): Ignore
top level qualifiers for pointer type comparisons.
* g++.dg/tree-ssa/copyprop-1.C: New testcase.
Co-Authored-By: Andrew Pinski <pinskia@gcc.gnu.org>
From-SVN: r115200
Diffstat (limited to 'gcc/cp/cp-objcp-common.c')
| -rw-r--r-- | gcc/cp/cp-objcp-common.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/cp/cp-objcp-common.c b/gcc/cp/cp-objcp-common.c index cb8369c..0b27abf 100644 --- a/gcc/cp/cp-objcp-common.c +++ b/gcc/cp/cp-objcp-common.c @@ -179,7 +179,8 @@ cxx_types_compatible_p (tree x, tree y) 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))) + && same_type_ignoring_top_level_qualifiers_p (TREE_TYPE (x), + TREE_TYPE (y))) return 1; return 0; |
