From patchwork Mon Oct 8 17:38:50 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Polacek X-Patchwork-Id: 190063 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 4DE7F2C031F for ; Tue, 9 Oct 2012 04:39:08 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1350322749; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To:User-Agent: Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:Sender:Delivered-To; bh=myFBilaQe5hYySxQ32iU YqkbJgY=; b=g5Cxq61ehsGOuVKVUdAr/hNHb5ZAMIpFhXIQGfQyl+NmLPP7NrD4 uoqXlydJ/hfSej9oGt5rmA9Q6Czfl1FnuDjU1iW710t+ixq4y1u80tcjKB5Z7zKC d1TdR+wj+/7WWV8WyUzWFAWOPOkutDMPO/ieBeFy+yogAyLduUq19r0= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To:User-Agent:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=nGgJg8ilPHINV+TNA1s2ktdBrp1TBb+E30Cy4HjaVxlBm3ob9Li15BmbFWPpGV UjVvGuRZCqVd7xge09Bp891KmUwweYihFbQBl0s9B93EpBG269NhCPCKzJstbd0Z Ozacci8HRqAxTHZBcCkuKIvK/08lyjFSJFAOgWFrxlSRo=; Received: (qmail 26294 invoked by alias); 8 Oct 2012 17:39:03 -0000 Received: (qmail 26148 invoked by uid 22791); 8 Oct 2012 17:39:02 -0000 X-SWARE-Spam-Status: No, hits=-7.4 required=5.0 tests=AWL, BAYES_00, KHOP_RCVD_UNTRUST, KHOP_SPAMHAUS_DROP, RCVD_IN_DNSWL_HI, RCVD_IN_HOSTKARMA_W, RP_MATCHES_RCVD, SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 08 Oct 2012 17:38:55 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q98HcsCJ018603 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 8 Oct 2012 13:38:55 -0400 Received: from redhat.com (ovpn-116-46.ams2.redhat.com [10.36.116.46]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q98Hcpub027199 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Mon, 8 Oct 2012 13:38:53 -0400 Date: Mon, 8 Oct 2012 19:38:50 +0200 From: Marek Polacek To: Jakub Jelinek Cc: GCC Patches Subject: Re: [PATCH] Fix up vt_add_function_parameter (PR debug/54831) Message-ID: <20121008173850.GS10286@redhat.com> References: <20121008155815.GR10286@redhat.com> <20121008160941.GA26735@tucnak.redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20121008160941.GA26735@tucnak.redhat.com> User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org On Mon, Oct 08, 2012 at 06:09:41PM +0200, Jakub Jelinek wrote: > Ok with those changes. Thanks, this is what I've checked in: 2012-10-08 Marek Polacek PR debug/54831 * var-tracking.c (vt_add_function_parameter): Use condition instead of gcc_assert. * testsuite/g++.dg/debug/pr54831.C: New test. Marek --- gcc/testsuite/g++.dg/debug/pr54831.C.mp 2012-10-08 12:14:55.790807737 +0200 +++ gcc/testsuite/g++.dg/debug/pr54831.C 2012-10-08 19:20:45.771190631 +0200 @@ -0,0 +1,20 @@ +// PR debug/54831 +// { dg-do compile } +// { dg-options "-O -fno-split-wide-types -g" } + +struct S +{ + int m1(); + int m2(); +}; + +typedef void (S::*mptr) (); + +mptr gmp; +void bar (mptr f); + +void foo (mptr f) +{ + f = gmp; + bar (f); +} --- gcc/var-tracking.c.mp 2012-10-08 10:56:32.354556352 +0200 +++ gcc/var-tracking.c 2012-10-08 19:19:15.031950120 +0200 @@ -9404,12 +9404,13 @@ vt_add_function_parameter (tree parm) if (parm != decl) { - /* Assume that DECL_RTL was a pseudo that got spilled to - memory. The spill slot sharing code will force the - memory to reference spill_slot_decl (%sfp), so we don't - match above. That's ok, the pseudo must have referenced - the entire parameter, so just reset OFFSET. */ - gcc_assert (decl == get_spill_slot_decl (false)); + /* If that DECL_RTL wasn't a pseudo that got spilled to + memory, bail out. Otherwise, the spill slot sharing code + will force the memory to reference spill_slot_decl (%sfp), + so we don't match above. That's ok, the pseudo must have + referenced the entire parameter, so just reset OFFSET. */ + if (decl != get_spill_slot_decl (false)) + return; offset = 0; }