This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/27084] Does not propagate memory load base through useless type conversion
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Apr 2006 23:11:20 -0000
- Subject: [Bug c++/27084] Does not propagate memory load base through useless type conversion
- References: <bug-27084-10053@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #6 from pinskia at gcc dot gnu dot org 2006-04-08 23:11 -------
Here is the patch which fixes this issue for me:
Index: cp-objcp-common.c
===================================================================
--- cp-objcp-common.c (revision 112789)
+++ cp-objcp-common.c (working copy)
@@ -179,7 +179,7 @@ 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;
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|tree-optimization |c++
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27084