From patchwork Sat Dec 8 15:51:57 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Botcazou X-Patchwork-Id: 204672 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id B569A2C0233 for ; Sun, 9 Dec 2012 02:54:27 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1355586869; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:From:To:Cc:Subject:Date:Message-ID:User-Agent: In-Reply-To:References:MIME-Version:Content-Type: Content-Transfer-Encoding:Mailing-List:Precedence:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=0q8qMGBrfp435uBUZDJ04tVob4s=; b=JGYg4raMBqyi/cc TiXKKLGJTeb//ijuNTgwu79j5mWb8/nXTWOw1FRTKi0mTjNSqQG8LtFuOQoi6Rfx sJgOufExNXieFDmLA52RvO9q+hwK0vmXeES2yZI660yj6o18d/gZHlwKmKqoQkZK g7lSatMviM/n+ogPG8teB/qs+GYk= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Received:From:To:Cc:Subject:Date:Message-ID:User-Agent:In-Reply-To:References:MIME-Version:Content-Type:Content-Transfer-Encoding:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=Zt5iTyhXPyMj6V4W1zKZx+RaWsSqCjnZDivUNXz+0UL3BusWeppUoQ9pLayM2s Sc8/0smz0LpL2+KU7uRm5kjVWhNVmiFlxmLr/NjNkbyKNVzea/0Fnag2wqTR18dh jPCZqIMMETwCdoJVKOp7GFIOJ4/KIxUo1vRV74Et+AIi4=; Received: (qmail 9101 invoked by alias); 8 Dec 2012 15:54:23 -0000 Received: (qmail 9086 invoked by uid 22791); 8 Dec 2012 15:54:22 -0000 X-SWARE-Spam-Status: No, hits=-3.0 required=5.0 tests=AWL, BAYES_00, KHOP_THREADED X-Spam-Check-By: sourceware.org Received: from mel.act-europe.fr (HELO mel.act-europe.fr) (194.98.77.210) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 08 Dec 2012 15:54:17 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 0131CCB3923; Sat, 8 Dec 2012 16:54:21 +0100 (CET) Received: from mel.act-europe.fr ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id IsQV4Z9Rd3y7; Sat, 8 Dec 2012 16:54:20 +0100 (CET) Received: from polaris.localnet (bon31-6-88-161-99-133.fbx.proxad.net [88.161.99.133]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mel.act-europe.fr (Postfix) with ESMTP id 3E690CB259E; Sat, 8 Dec 2012 16:54:20 +0100 (CET) From: Eric Botcazou To: Jakub Jelinek Cc: gcc-patches@gcc.gnu.org, Jan Hubicka , Jan Hubicka , Richard Biener Subject: Re: [PATCH] Don't drop DECL_INITIAL if -g for DWARF2+ (PR fortran/55395) Date: Sat, 08 Dec 2012 16:51:57 +0100 Message-ID: <2566667.Dv0IlRhJMA@polaris> User-Agent: KMail/4.7.2 (Linux/3.1.10-1.16-desktop; KDE/4.7.2; x86_64; ; ) In-Reply-To: <20121206203311.GP2315@tucnak.redhat.com> References: <20121206190628.GN2315@tucnak.redhat.com> <20121206201248.GF671@atrey.karlin.mff.cuni.cz> <20121206203311.GP2315@tucnak.redhat.com> MIME-Version: 1.0 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 > > OK. How we want to handle this with LTO streaming? > > Don't know. From debug info quality POV right now, LTO has lots of other > more important issues first. And from the invalid error POV, that only > matters if the initializer changes in between RTL expansion of some function > and end of compilation, so could be fine for now. If not C++-style const, > the DECL_INITIAL is used only in the CUs where the definition of the symbol > is emitted or would be emitted anyway. This breaks LTO bootstrap with Ada enabled though, because the following DECL_IN_CONSTANT_POOL variable has had its DECL_INITIAL wrongly reset: (gdb) p debug_tree(decl) unit size align 32 symtab -152784816 alias set 38 canonical type 0x7ffff6e46bd0 fields nonaddressable SI file line 0 col 0 size unit size align 32 offset_align 128 offset bit offset context chain > pointer_to_this chain > readonly addressable static ignored in-constant-pool DI file (null) line 0 col 0 size unit size align 32 initial > so I've installed the attached patch as obvious after testing on x86-64/Linux. 2012-12-08 Eric Botcazou * lto-streamer-out.c (lto_write_tree): Do not reset the DECL_INITIAL of variables in the global contant pool. Index: lto-streamer-out.c =================================================================== --- lto-streamer-out.c (revision 194319) +++ lto-streamer-out.c (working copy) @@ -328,6 +328,7 @@ lto_write_tree (struct output_block *ob, tree initial = DECL_INITIAL (expr); if (TREE_CODE (expr) == VAR_DECL && (TREE_STATIC (expr) || DECL_EXTERNAL (expr)) + && !DECL_IN_CONSTANT_POOL (expr) && initial) { lto_symtab_encoder_t encoder;