From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2318 invoked by alias); 21 Mar 2013 20:03:28 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 2260 invoked by uid 48); 21 Mar 2013 20:03:21 -0000 From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/55608] [4.6/4.7/4.8/4.9 Regression] Debug info quality regressions with file scope vars Date: Thu, 21 Mar 2013 20:03:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: debug X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: jakub at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.9.0 X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 X-SW-Source: 2013-03/txt/msg01479.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55608 --- Comment #6 from Jakub Jelinek 2013-03-21 20:03:19 UTC --- Author: jakub Date: Thu Mar 21 17:35:39 2013 New Revision: 196886 URL: http://gcc.gnu.org/viewcvs?rev=196886&root=gcc&view=rev Log: PR debug/55608 * dwarf2out.c (tree_add_const_value_attribute): Call ggc_free (array) on failure. (resolve_one_addr): Fail if referenced STRING_CST hasn't been written. (string_cst_pool_decl): New function. (optimize_one_addr_into_implicit_ptr): New function. (resolve_addr_in_expr): Optimize DWARF location expression DW_OP_addr DW_OP_stack_value where DW_OP_addr refers to some variable which doesn't live in memory, but has DW_AT_location or DW_AT_const_value, or refers to a string literal, into DW_OP_GNU_implicit_pointer. (optimize_location_into_implicit_ptr): New function. (resolve_addr): If removing DW_AT_location of a variable because it was DW_OP_addr of address of the variable, but the variable doesn't live in memory, try to emit const value attribute for the initializer. Modified: trunk/gcc/ChangeLog trunk/gcc/dwarf2out.c