From patchwork Fri Jan 8 21:22:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Hubicka X-Patchwork-Id: 565071 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 D7FD1140B9A for ; Sat, 9 Jan 2016 08:22:28 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=Y3kPwikx; dkim-atps=neutral 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=UKwYVBd12dtcqogxn4ggNnWzk5ohQ+1j1rx7OXU+7bjebQJvEUYhS D7ySVRod0LFs0RunIx1iqtaxWYBPPuz/wZn2kCWU0NOvaovPz3/9c63cplpmrMfQ UnAqktTsrk77L0yJ+O2oq595OYGAoB11UETwmJmcsi02P+CkHdgnsc= 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=1xajBbTYIIF6qCjtyW6IsGvek2U=; b=Y3kPwikxfcxmXvKpyoCl kj/Beq91jyL+Jm8PZkgQ9Lf7tHLf4/PC5JSRvN3Kep3waJ7h6dQZVjn4npP8IIdj rCqc7BbKL6WACudSZR10bbVeK4S3chUR6koZOXTy2DLUaoa3gwV+jsu/I+kiQ8R8 F6T2wUocfjAq4YnV0usaW2M= Received: (qmail 7740 invoked by alias); 8 Jan 2016 21:22:20 -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 7727 invoked by uid 89); 8 Jan 2016 21:22:20 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.5 required=5.0 tests=AWL, BAYES_05, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=addressable, 65535, H*MI:kam, H*M:kam X-HELO: nikam.ms.mff.cuni.cz Received: from nikam.ms.mff.cuni.cz (HELO nikam.ms.mff.cuni.cz) (195.113.20.16) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 08 Jan 2016 21:22:18 +0000 Received: by nikam.ms.mff.cuni.cz (Postfix, from userid 16202) id 944B7541C91; Fri, 8 Jan 2016 22:22:14 +0100 (CET) Date: Fri, 8 Jan 2016 22:22:14 +0100 From: Jan Hubicka To: gcc-patches@gcc.gnu.org Subject: FIx ipa-icf ICE during libreoffice build Message-ID: <20160108212214.GD5527@kam.mff.cuni.cz> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Hi, this patch fixes an ICE on artificial VAR_DECL that has no DECL_NAME set. unit size align 16 symtab 0 alias set -1 canonical type 0x2aaaabdd9738 precision 16 min max pointer_to_this reference_to_this > HI size unit size align 16 symtab 0 alias set -1 structural equality domain DI size unit size align 64 symtab 0 alias set -1 canonical type 0x2aaaabdd9930 precision 64 min max > pointer_to_this > readonly constant addressable static ignored HI file /aux/hubicka/libreoffice2/core/sw/source/core/unocore/unotbl.cxx line 1896 col 0 size unit size align 16 context initial > * ipa-icf.c (sem_item_optimizer::merge_classes): Do not ice when DECL_NAME is not set. Index: ipa-icf.c =================================================================== --- ipa-icf.c (revision 232130) +++ ipa-icf.c (working copy) @@ -3400,7 +3400,8 @@ sem_item_optimizer::merge_classes (unsig sem_item *source = c->members[0]; - if (MAIN_NAME_P (DECL_NAME (source->decl))) + if (DECL_NAME (source->decl) + && MAIN_NAME_P (DECL_NAME (source->decl))) /* If merge via wrappers, picking main as the target can be problematic. */ source = c->members[1];