From patchwork Tue Feb 25 10:35:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Botcazou X-Patchwork-Id: 1243983 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-520067-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=adacore.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha1 header.s=default header.b=q44B5tJl; 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 48Rb2660mKz9sRY for ; Tue, 25 Feb 2020 21:36:13 +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 :to:subject:date:message-id:mime-version:content-type :content-transfer-encoding; q=dns; s=default; b=t54WCIpqMW/b8mSL q0IJ1qAVdV7aW5YQtJ9N57NjZNa1RlZeIwzt7YFECVV/obU3Rqvj6+v5xrMwwgW4 JGTsecthoAvYbukNBzbiAGMlUQSESgR7TemUvOyNcYSBhYyGvZa4t+VAweKlbk1g CXW9gpKqkCzgvfO/bafNvrd2YUs= 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 :to:subject:date:message-id:mime-version:content-type :content-transfer-encoding; s=default; bh=s05Tfkgz5TnZHPWGH4yk47 4B07s=; b=q44B5tJlTCZ/feB1IKUlOy1LRTQpP+zmBvBh3c353LNHDLC2MGL+8k l3IuM0hhNxZfOhFVMXys+CvUlF57tByRujWKwN22d9qRicDelYMLXf4mhdWiy0Lp 7/4AtCGqeRVqF7fWDn/gHSe0Po1s8BXe1jSO7nXvgIcwYu2JdJdwM= Received: (qmail 6592 invoked by alias); 25 Feb 2020 10:36:05 -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 6581 invoked by uid 89); 25 Feb 2020 10:36:05 -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, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: smtp.eu.adacore.com Received: from mel.act-europe.fr (HELO smtp.eu.adacore.com) (194.98.77.210) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 25 Feb 2020 10:35:55 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id E80A281368 for ; Tue, 25 Feb 2020 11:35:52 +0100 (CET) Received: from smtp.eu.adacore.com ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Rk_nVCSRK4v1 for ; Tue, 25 Feb 2020 11:35:52 +0100 (CET) Received: from polaris.localnet (unknown [IPv6:2a01:e0a:41b:9230:1a03:73ff:fe45:373a]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.eu.adacore.com (Postfix) with ESMTPSA id C185981348 for ; Tue, 25 Feb 2020 11:35:52 +0100 (CET) From: Eric Botcazou To: gcc-patches@gcc.gnu.org Subject: [patch] Fix link failure with debug info in LTO mode Date: Tue, 25 Feb 2020 11:35:50 +0100 Message-ID: <1672625.LqMC4mkd7s@polaris> MIME-Version: 1.0 Hi, this is a regression present on all active branches: the attached testcase fails to link with debug info in LTO mode because of an undefined reference to a symbol coming from the object files containing the early debug info. Tested on x86_64-suse-linux, OK for all active branches? 2019-20-25 Eric Botcazou * dwarf2out.c (dwarf2out_size_function): Run in early-DWARF mode. 2019-20-25 Eric Botcazou * gnat.dg/lto24.adb: New test. * gnat.dg/lto24_pkg1.ads: New helper. * gnat.dg/lto24_pkg2.ad[sb]: Likewise. diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index fe46c7e1eee..1fcb19a0489 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -27610,6 +27610,7 @@ dwarf2out_inline_entry (tree block) static void dwarf2out_size_function (tree decl) { + set_early_dwarf s; function_to_dwarf_procedure (decl); }