From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3188 invoked by alias); 10 Apr 2015 16:28:10 -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 3176 invoked by uid 89); 10 Apr 2015 16:28:10 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.0 required=5.0 tests=AWL,BAYES_40,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 10 Apr 2015 16:28:09 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t3AGS8xv031793 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 10 Apr 2015 12:28:08 -0400 Received: from tucnak.zalov.cz (ovpn-116-24.ams2.redhat.com [10.36.116.24]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t3AGS6Dc007333 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 10 Apr 2015 12:28:07 -0400 Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.14.9/8.14.9) with ESMTP id t3AGS4Kb022681; Fri, 10 Apr 2015 18:28:04 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.14.9/8.14.9/Submit) id t3AGS1PS022680; Fri, 10 Apr 2015 18:28:01 +0200 Date: Fri, 10 Apr 2015 16:28:00 -0000 From: Jakub Jelinek To: Martin =?utf-8?B?TGnFoWth?= Cc: GCC Patches , Jan Hubicka Subject: Re: [PATCH] Fix PR ipa/65722 Message-ID: <20150410162801.GY19273@tucnak.redhat.com> Reply-To: Jakub Jelinek References: <5527F705.5020509@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <5527F705.5020509@suse.cz> User-Agent: Mutt/1.5.23 (2014-03-12) X-IsSubscribed: yes X-SW-Source: 2015-04/txt/msg00457.txt.bz2 On Fri, Apr 10, 2015 at 06:15:01PM +0200, Martin Liška wrote: > Attached patch fixes PR, where we should consider just cgraph_nodes as > objects referred by virtual table. > > Patch survives regression tests on x86_64-linux-pc with enabled checking. > > Ready for trunk? > Thanks, > Martin > >From 8bff38438f6ba57732a6c3ccc3632f6789ca4d7e Mon Sep 17 00:00:00 2001 > From: mliska > Date: Fri, 10 Apr 2015 11:37:04 +0200 > Subject: [PATCH] Fix PR ipa/65722. > > gcc/testsuite/ChangeLog: > > 2015-04-10 Martin Liska > Please add PR line here too. > * g++.dg/ipa/pr65722.C: New test. > > gcc/ChangeLog: > > 2015-04-10 Martin Liska > > PR ipa/65722 > * ipa-icf.c (sem_variable::equals_wpa): Consider comparsion just > for references coming from cgraph nodes. > --- > gcc/ipa-icf.c | 4 ++++ > gcc/testsuite/g++.dg/ipa/pr65722.C | 21 +++++++++++++++++++++ > 2 files changed, 25 insertions(+) > create mode 100644 gcc/testsuite/g++.dg/ipa/pr65722.C > > diff --git a/gcc/ipa-icf.c b/gcc/ipa-icf.c > index 8f8a0cf..9e5d19c 100644 > --- a/gcc/ipa-icf.c > +++ b/gcc/ipa-icf.c > @@ -1670,6 +1670,10 @@ sem_variable::equals_wpa (sem_item *item, > /* DECL_FINAL_P flag on methods referred by virtual tables is used > to decide on completeness possible_polymorphic_call_targets lists > and therefore it must match. */ > + if (!is_a (ref->referred) > + || !is_a (ref2->referred)) > + continue; > + Wouldn't it be better to move this check before the DECL_FINAL_P comment, so that it is closer to the uses? Jakub