From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19545 invoked by alias); 30 Mar 2015 17:20:23 -0000 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 Received: (qmail 19526 invoked by uid 89); 30 Mar 2015 17:20:22 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: atrey.karlin.mff.cuni.cz Received: from atrey.karlin.mff.cuni.cz (HELO atrey.karlin.mff.cuni.cz) (195.113.26.193) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 30 Mar 2015 17:20:21 +0000 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 4018) id C0BFB81ED0; Mon, 30 Mar 2015 19:20:19 +0200 (CEST) Date: Mon, 30 Mar 2015 17:20:00 -0000 From: Jan Hubicka To: Ilya Enkovich Cc: Jan Hubicka , gcc-patches Subject: Re: Fix ice on comdat groups with -check-pointer-bounds Message-ID: <20150330172019.GD14471@atrey.karlin.mff.cuni.cz> References: <20150327152309.GD63825@kam.mff.cuni.cz> <20150330113121.GA52842@msticlxl57.ims.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150330113121.GA52842@msticlxl57.ims.intel.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes X-SW-Source: 2015-03/txt/msg01570.txt.bz2 > On 30 Mar 14:05, Ilya Enkovich wrote: > > 2015-03-27 18:23 GMT+03:00 Jan Hubicka : > > > Index: symtab.c > > > =================================================================== > > > --- symtab.c (revision 221734) > > > +++ symtab.c (working copy) > > > @@ -1130,15 +1130,20 @@ symtab_node::verify_symtab_nodes (void) > > > &existed); > > > if (!existed) > > > *entry = node; > > > - else > > > - for (s = (*entry)->same_comdat_group; s != NULL && s != node; s = s->same_comdat_group) > > > + else if (!DECL_EXTERNAL (node->decl)) > > > + { > > > + for (s = (*entry)->same_comdat_group; s != NULL && s != node; > > > + s = s->same_comdat_group) > > > + ; > > > > With no if-statement in the loop body you need an additional exit > > condition for a case when you reach the entry. > > > > Thanks, > > Ilya > > > > Here is a patch to add a testcase, fix the loop and avoid same_comdat_group for instrumented external symbols. Does it look OK? OK > > BTW should we check same_comdat_group is NULL for external symbols? We could do that, yes. If you can come with a patch, it is OK for next stage1. Honza