From patchwork Thu Jan 31 15:22:44 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Merrill X-Patchwork-Id: 217199 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 4715B2C007A for ; Fri, 1 Feb 2013 02:23:05 +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=1360250586; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Message-ID:Date:From:User-Agent:MIME-Version:To:Subject: References:In-Reply-To:Content-Type:Mailing-List:Precedence: List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=k35Zlu8Vj1pnx2XKRYCcgnH8PgY=; b=dlQoxAp3GtVHKw5 7xYgfatVEwARMxFanikKZfVfa+vpQzyPi3TBlRVLMbmKeDWjxiSZPb6v6kux2R1I +9XyawOLoha3+cgWOheu9vrOb9L6+8l29nfqRUktDxuflO8ZJgnotHFahOCdpT1t T5JT8OZ3nIxNFnzJSKVXGJyA4yyI= 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:Message-ID:Date:From:User-Agent:MIME-Version:To:Subject:References:In-Reply-To:Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=kx/bmafVjOQjzCCyPLYzqDBTXkKkjNAGEbcTcYzp+UyDH98xBED5YqgdOJmHxQ lJL3PaBpcph520WiBHxGuhhxZchBd0qLWMvNsAMjNIcUA/IS0ualrZgAx8rTuzRo gRdDZ7qDZVn6SgFz65cTiaObtJVVCyVM73V1dd+pA3/S4=; Received: (qmail 1905 invoked by alias); 31 Jan 2013 15:22:57 -0000 Received: (qmail 1895 invoked by uid 22791); 31 Jan 2013 15:22:56 -0000 X-SWARE-Spam-Status: No, hits=-7.1 required=5.0 tests=AWL, BAYES_00, KHOP_RCVD_UNTRUST, KHOP_SPAMHAUS_DROP, KHOP_THREADED, 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; Thu, 31 Jan 2013 15:22:45 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r0VFMjel015049 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 31 Jan 2013 10:22:45 -0500 Received: from [10.3.113.27] (ovpn-113-27.phx2.redhat.com [10.3.113.27]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r0VFMipp016947 for ; Thu, 31 Jan 2013 10:22:44 -0500 Message-ID: <510A8C44.9060004@redhat.com> Date: Thu, 31 Jan 2013 10:22:44 -0500 From: Jason Merrill User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: gcc-patches List Subject: C++ PATCH for c++/56162 (pmf1.C failure on arm) References: <5102C778.3080302@redhat.com> In-Reply-To: <5102C778.3080302@redhat.com> 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 In my 56104 patch I failed to notice that in the ARM (vbit in delta) case, we need to adjust the delta even if we know we're doing a non-virtual call. Tested x86_64-pc-linux-gnu, applying to trunk. commit 6a52d34876377448990d550cb763171180f44444 Author: Jason Merrill Date: Thu Jan 31 09:45:49 2013 -0500 PR c++/56162 PR c++/56104 * typeck.c (get_member_function_from_ptrfunc): Fix ptrmemfunc_vbit_in_delta case. diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c index bfac394..688c266 100644 --- a/gcc/cp/typeck.c +++ b/gcc/cp/typeck.c @@ -3176,9 +3176,7 @@ get_member_function_from_ptrfunc (tree *instance_ptrptr, tree function, e3 = pfn_from_ptrmemfunc (function); delta = delta_from_ptrmemfunc (function); idx = build1 (NOP_EXPR, vtable_index_type, e3); - if (nonvirtual) - e1 = integer_zero_node; - else switch (TARGET_PTRMEMFUNC_VBIT_LOCATION) + switch (TARGET_PTRMEMFUNC_VBIT_LOCATION) { case ptrmemfunc_vbit_in_pfn: e1 = cp_build_binary_op (input_location,