re PR debug/55608 (Debug info quality regressions with file scope vars)
authorJakub Jelinek <jakub@redhat.com>
Thu, 21 Mar 2013 17:35:39 +0000 (18:35 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 21 Mar 2013 17:35:39 +0000 (18:35 +0100)
commitc845cfe1af6a72609e04a68b967f2b919599b32b
treeceb9b4cba8f3ed7614a17bae32388520d9fd8686
parent4a5e2469172776e76626c1849d2e0c07f79226d1
re PR debug/55608 (Debug info quality regressions with file scope vars)

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.

From-SVN: r196886
gcc/ChangeLog
gcc/dwarf2out.c