From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21633 invoked by alias); 11 Apr 2007 01:13:29 -0000 Received: (qmail 21583 invoked by uid 22791); 11 Apr 2007 01:13:28 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 11 Apr 2007 02:13:26 +0100 Received: (qmail 6086 invoked from network); 11 Apr 2007 01:13:24 -0000 Received: from unknown (HELO ?192.168.0.2?) (mitchell@127.0.0.2) by mail.codesourcery.com with ESMTPA; 11 Apr 2007 01:13:24 -0000 Message-ID: <461C362F.8020407@codesourcery.com> Date: Wed, 11 Apr 2007 01:13:00 -0000 From: Mark Mitchell User-Agent: Thunderbird 1.5.0.10 (Windows/20070221) MIME-Version: 1.0 To: Mike Stump CC: "gcc-patches@gcc.gnu.org Patches" , Diego Novillo Subject: Re: PR 29585: C++ front end not setting TREE_ADDRESSABLE on vtbl entries References: <460EA260.3000404@redhat.com> <609E9D48-5C58-436C-AA82-B77A016E58C0@apple.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2007-04/txt/msg00500.txt.bz2 Mike Stump wrote: > --- ./cp/class.c.~1~ 2007-04-04 19:37:15.000000000 -0700 > +++ ./cp/class.c 2007-04-10 17:34:46.000000000 -0700 > @@ -7108,7 +7108,7 @@ dfs_accumulate_vtbl_inits (tree binfo, > index = size_binop (MULT_EXPR, > TYPE_SIZE_UNIT (vtable_entry_type), > index); > - vtbl = build2 (PLUS_EXPR, TREE_TYPE (vtbl), vtbl, index); > + vtbl = build2 (PLUS_EXPR, vtbl_ptr_type_node, vtbl, index); That does not look to be type-correct at the tree level; the type of VTBL + INDEX should be the same as the type of VTBL. You should probably be using fold_convert to add the conversion, after the addition. > I'll check this in tomorrow unless a maintainer of the code thinks it's not obvious or wrong, pretty sure it's better than the status quo. I think that you should consider recalibrating your obviousness meter. Thanks, -- Mark Mitchell CodeSourcery mark@codesourcery.com (650) 331-3385 x713