From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25232 invoked by alias); 8 Apr 2006 23:11:23 -0000 Received: (qmail 25218 invoked by uid 48); 8 Apr 2006 23:11:20 -0000 Date: Sat, 08 Apr 2006 23:11:00 -0000 Message-ID: <20060408231120.25217.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c++/27084] Does not propagate memory load base through useless type conversion In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "pinskia at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-04/txt/msg00702.txt.bz2 List-Id: ------- 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