From patchwork Tue Aug 19 10:25:48 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Polacek X-Patchwork-Id: 381307 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]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id B4CD0140093 for ; Tue, 19 Aug 2014 20:26:19 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; q=dns; s= default; b=KJolJB+95DlWBg9g2yENDbCtZ6EcZxzGXt0XODIVgr/m7o+IO5Mez cGgnI2LIDGSelR08Ps5soRDwEfmu5ecw5TcxwSdpHLRF1y7uPrgJmKulzWcJsZos w8HWm5WRBhyG/coPnA7eYyUUuGD+2zAVF9mfRzyRfJqlP9rQD71uRo= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; s= default; bh=Je8Nq1czWYKxZMa975t8Q/Cn4sk=; b=e5ajbs0c51uNiNUvCU9S t6TojISksC080glftDcG4HrXvh7N+1W8uhgIj45rdXRJ4icIsRWvUEhOq4emn5U4 lvmZVuDPKUU0Qy9YTibQ7RSD6L70fhP0uFKDwfN1953ftv1XT4tALGbuK0lpk5wi ul4wU3qaAga/7/9f264lZBc= Received: (qmail 28934 invoked by alias); 19 Aug 2014 10:26:03 -0000 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 Received: (qmail 28925 invoked by uid 89); 19 Aug 2014 10:26:02 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.0 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS, SPF_PASS 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; Tue, 19 Aug 2014 10:26:01 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s7JAPsO5032581 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 19 Aug 2014 06:25:57 -0400 Received: from redhat.com (ovpn-116-27.ams2.redhat.com [10.36.116.27]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s7JAPnG8024414 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NO); Tue, 19 Aug 2014 06:25:53 -0400 Date: Tue, 19 Aug 2014 12:25:48 +0200 From: Marek Polacek To: GCC Patches , Jan Hubicka Subject: [PATCH] Fix thinko in handle_alias_pairs (PR c/61271) Message-ID: <20140819102548.GG11974@redhat.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) handle_alias_pairs contains the following thinko. I believe it should be "not a virtual function". Bootstrapped/regtested on x86_64-linux, ok for trunk? 2014-08-19 Marek Polacek PR c/61271 * cgraphunit.c (handle_alias_pairs): Fix condition. Marek diff --git gcc/cgraphunit.c gcc/cgraphunit.c index d9acc65..2c2006b 100644 --- gcc/cgraphunit.c +++ gcc/cgraphunit.c @@ -1171,7 +1171,7 @@ handle_alias_pairs (void) /* We use local aliases for C++ thunks to force the tailcall to bind locally. This is a hack - to keep it working do the following (which is not strictly correct). */ - && (! TREE_CODE (target_node->decl) == FUNCTION_DECL + && (TREE_CODE (target_node->decl) != FUNCTION_DECL || ! DECL_VIRTUAL_P (target_node->decl)) && ! lookup_attribute ("weakref", DECL_ATTRIBUTES (p->decl))) {