From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 309 invoked by alias); 21 Feb 2019 19:06:13 -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 131039 invoked by uid 89); 21 Feb 2019 19:06:12 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=H*M:0d20, 86964 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 ESMTP; Thu, 21 Feb 2019 19:06:08 +0000 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 41FC4E6A68; Thu, 21 Feb 2019 19:06:07 +0000 (UTC) Received: from localhost.localdomain (ovpn-112-17.rdu2.redhat.com [10.10.112.17]) by smtp.corp.redhat.com (Postfix) with ESMTP id 41F7460BF2; Thu, 21 Feb 2019 19:06:06 +0000 (UTC) Subject: Re: [PATCH] Remove unused extern variables from debug (PR debug/86964) To: Johan Carlsson , "gcc-patches@gcc.gnu.org" Cc: "rguenther@suse.de" References: From: Jeff Law Openpgp: preference=signencrypt Message-ID: <1043f46b-20ff-0d20-2cc3-27f4300f465d@redhat.com> Date: Thu, 21 Feb 2019 19:22:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2019-02/txt/msg01758.txt.bz2 On 2/19/19 5:51 AM, Johan Carlsson wrote: > Adding so that the DIEs of unused external variables can be removed from the output when > using -feliminate-unused-debug-symbols. > > Tested on x86_64-elf, aarch64-elf, powerpc-eabi, powerpc64-elf and arm-eabi. > > > 2019-02-18 Johan Karlsson > > PR debug/86964 > * dwarf2out.c (premark_used_variables): New function. > (prune_unused_types_walk): Do not mark not premarked external > variables. > (prune_unused_types): Call premark_used_variables. > > * gcc.dg/debug/dwarf2/pr86964.c: New testcase. Just a note, we're addressing regression bugfixes only at this point in GCC development. I've queued this for gcc-10. jeff