From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 87525 invoked by alias); 17 Jan 2019 08:43:49 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 86701 invoked by uid 89); 17 Jan 2019 08:43:48 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.4 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_NUMSUBJECT,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1030 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; Thu, 17 Jan 2019 08:43:47 +0000 Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id A1D86AD0A for ; Thu, 17 Jan 2019 08:43:44 +0000 (UTC) Date: Thu, 17 Jan 2019 08:43:00 -0000 From: Richard Biener To: gcc-patches@gcc.gnu.org Subject: [PATCH] Fix PR86736 Message-ID: User-Agent: Alpine 2.20 (LSU 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-SW-Source: 2019-01/txt/msg00987.txt.bz2 The following reportedly fixes PR86736, a dwarf2out ICE with -gpubnames (default on darwin) when compiling with -g0 (default on darwin) but linking with -g. pubnames (and types) are really part of early debug - there is no point in emitting those late (but the early part also fails, see PR88878 I opened). Committed to trunk. Richard. 2019-01-17 Richard Biener PR lto/86736 * dwarf2out.c (want_pubnames): Never generate pubnames sections and friends for the LTO part of debug info. diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index a1b5a5eaf19..cd2e889a8cc 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -11074,7 +11074,9 @@ output_comp_unit (dw_die_ref die, int output_if_empty, static inline bool want_pubnames (void) { - if (debug_info_level <= DINFO_LEVEL_TERSE) + if (debug_info_level <= DINFO_LEVEL_TERSE + /* Names and types go to the early debug part only. */ + || in_lto_p) return false; if (debug_generate_pub_sections != -1) return debug_generate_pub_sections;