From patchwork Wed Oct 9 13:40:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Biener X-Patchwork-Id: 1173779 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-510547-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="TWCkAwMK"; 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 46pFjv4NxRz9sCJ for ; Thu, 10 Oct 2019 00:41:23 +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:date :from:to:cc:subject:message-id:mime-version:content-type; q=dns; s=default; b=y7oaDG439geHGTW3chzv2GsUgU4KSwZN5nvZQ1dq09hhgQd0Z1 NUQU3GI654k5sOdGpKZmGfwXDgC/mYT+Ytcx6xFrl3c4na4aFJ2uP5pC5ivOcuRT ej7KVsGCssd/8JYPu0v/NnqMNTBqolQq46x4ArSwVkIAlpKSC72TYOrNI= 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:cc:subject:message-id:mime-version:content-type; s= default; bh=jGZvKQtsyBcduDZXM4RkzqK6A3U=; b=TWCkAwMKvRUQPuZ3lGXE wLOdcB+0oU+wKkRLEJ6ycMifyxHj4iqdEsUyQbPUhB6LhoGrfd9EC4u71JYqKR8U 2EVoUAOv7/+NeHP91bo38S6vVUlr1eEtyibG/0BS/8L72YFXR5HU3yLcOC+PTVwl 2r1dSzx4U6vjp/KklS/rK5o= Received: (qmail 123578 invoked by alias); 9 Oct 2019 13:40:47 -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 123491 invoked by uid 89); 9 Oct 2019 13:40:47 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-18.3 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_PASS autolearn=ham version=3.3.1 spammy=HX-Languages-Length:1337 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; Wed, 09 Oct 2019 13:40:45 +0000 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id BC4BBABCB for ; Wed, 9 Oct 2019 13:40:43 +0000 (UTC) Date: Wed, 9 Oct 2019 15:40:43 +0200 (CEST) From: Richard Biener To: gcc-patches@gcc.gnu.org cc: Jan Hubicka Subject: [PATCH][LTO] Do not merge anonymous NAMESPACE_DECLs Message-ID: User-Agent: Alpine 2.21 (LSU 202 2017-01-01) MIME-Version: 1.0 The following does $subject which likely fixes some debuginfo issues with anonymous namespaces (but likely artificial and not too noticable?! we'd get bogus contexts for DIEs) Bootstrapped and tested on x86_64-unknown-linux-gnu. I'm doin a LTO bootstrap right now (but IIRC it failed a few days ago) Richard. 2019-10-09 Richard Biener lto/ * lto-common.c (unify_scc): Do not merge anonymous NAMESPACE_DECLs. diff --git a/gcc/lto/lto-common.c b/gcc/lto/lto-common.c index 9a17933d094..e5c15f2b844 100644 --- a/gcc/lto/lto-common.c +++ b/gcc/lto/lto-common.c @@ -1646,11 +1646,13 @@ unify_scc (class data_in *data_in, unsigned from, tree t = streamer_tree_cache_get_tree (cache, from + i); scc->entries[i] = t; /* Do not merge SCCs with local entities inside them. Also do - not merge TRANSLATION_UNIT_DECLs and anonymous namespace types. */ + not merge TRANSLATION_UNIT_DECLs and anonymous namespaces + and types therein types. */ if (TREE_CODE (t) == TRANSLATION_UNIT_DECL || (VAR_OR_FUNCTION_DECL_P (t) && !(TREE_PUBLIC (t) || DECL_EXTERNAL (t))) || TREE_CODE (t) == LABEL_DECL + || (TREE_CODE (t) == NAMESPACE_DECL && !DECL_NAME (t)) || (TYPE_P (t) && type_with_linkage_p (TYPE_MAIN_VARIANT (t)) && type_in_anonymous_namespace_p (TYPE_MAIN_VARIANT (t))))