From patchwork Fri Nov 16 12:44:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Martin_Li=C5=A1ka?= X-Patchwork-Id: 998936 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-490244-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="wnQwmeLO"; dkim-atps=neutral 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 42xHx24Trlz9sCX for ; Fri, 16 Nov 2018 23:44:20 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :subject:to:message-id:date:mime-version:content-type; q=dns; s= default; b=LQhguBJSS4ltxepVBgbtMZ+xLUvM0r3dVDjNr8mfBn976RFYf+2yB 3rPajl5G/oTtZ0j898WzcZp3DN6+xBLd6VFZx1XhRxRtuvFBlD2dMjW9uaFyHuBK KNYJouNrFwxYJRihf1EJQDExu80zrO8BsQvUeO0V5kyoR95RZ6NlDc= 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:from :subject:to:message-id:date:mime-version:content-type; s= default; bh=tMDpa7EoOcukxTIzDJpeYXstev4=; b=wnQwmeLOwod8GSG2cYaH Yu5C7q8AC8XfE10tV/l/FNkyOS3EIyMkZxpt+llZ27QCI9Y8hv44YuU4i7zAMkMt RfqNrkDYGVUXxP2TDeFlrDqP5GgV/9nnUFdMOQr/YZnBOxTY6UIQc3mzhnw2NkAC ThLljLn1W8EXHzAzJDJNKuI= Received: (qmail 96412 invoked by alias); 16 Nov 2018 12:44:14 -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 96399 invoked by uid 89); 16 Nov 2018 12:44:13 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_PASS autolearn=ham version=3.3.2 spammy=survives, cgraph_node X-HELO: mx1.suse.de Received: from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 16 Nov 2018 12:44:12 +0000 Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 1EE7DAD4B; Fri, 16 Nov 2018 12:44:10 +0000 (UTC) From: =?utf-8?q?Martin_Li=C5=A1ka?= Subject: [PATCH] Fix ICE in lto_symtab_merge_symbols_1 (PR lto/88004). To: GCC Patches , Jan Hubicka Message-ID: <5c550cf5-9029-e2c7-e030-057f982ba811@suse.cz> Date: Fri, 16 Nov 2018 13:44:09 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0 MIME-Version: 1.0 X-IsSubscribed: yes Hi. This is fix for the PR which we cooked with Honza. He pre-approved that. Survives regression tests and bootstrap on x86_64-linux-gnu. I'm going to install it. Martin gcc/lto/ChangeLog: 2018-11-16 Martin Liska PR lto/88004 * lto-symtab.c (lto_symtab_merge_symbols_1): Do not call lto_symtab_symbol_p as it does checking of transparent alias. These needs to be also merged in the function. --- gcc/lto/lto-symtab.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gcc/lto/lto-symtab.c b/gcc/lto/lto-symtab.c index 4b24b84774d..18437eb2841 100644 --- a/gcc/lto/lto-symtab.c +++ b/gcc/lto/lto-symtab.c @@ -894,10 +894,11 @@ lto_symtab_merge_symbols_1 (symtab_node *prevailing) e = next) { next = e->next_sharing_asm_name; + cgraph_node *ce = dyn_cast (e); - if (!lto_symtab_symbol_p (e)) + if ((!TREE_PUBLIC (e->decl) && !DECL_EXTERNAL (e->decl)) + || (ce != NULL && ce->global.inlined_to)) continue; - cgraph_node *ce = dyn_cast (e); symtab_node *to = symtab_node::get (lto_symtab_prevailing_decl (e->decl)); /* No matter how we are going to deal with resolution, we will ultimately