OSDN Git Service

PR debug/41404
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 2 Oct 2009 15:01:22 +0000 (15:01 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 2 Oct 2009 15:01:22 +0000 (15:01 +0000)
commit0f89d483354000f18b62b68da3982a7a2d3cda2a
treec18228efb40a0e59c5eb72d9e3b4378820263cdd
parent6d5c9afa5e6f93ca689c47600782fdd8695eb632
PR debug/41404
PR debug/41353
* cfgexpand.c (expand_debug_expr) <case STRING_CST>: Don't create
CONST_STRING if STRING_CST contains embedded '\0's or doesn't end with
'\0'.
(expand_debug_expr) <case VAR_DECL>: For TREE_STATIC !DECL_EXTERNAL
vars use DECL_RTL with resetting it back to NULL afterwards.
* dwarf2out.c (same_dw_val_p): For dw_val_class_addr compare with
rtx_equal_p instead of asserting it is a SYMBOL_REF.
(value_format): For dw_val_class_addr only use DW_FORM_addr if
the attribute type allows it, otherwise use DW_FORM_dataN.
(mem_loc_descriptor): Handle CONST_STRING.
(add_const_value_attribute): Handle CONST_STRING using add_AT_addr.
Handle MEM with CONST_STRING address using add_AT_string.
(rtl_for_decl_init): Return MEM with CONST_STRING address instead of
CONST_STRING for const arrays initialized with a string literal.
(resolve_one_addr, resolve_addr_in_expr, resolve_addr): New functions.
(dwarf2out_finish): Call resolve_addr.

* gcc.dg/guality/pr41404-1.c: New test.
* gcc.dg/guality/pr41353-2.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@152403 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/cfgexpand.c
gcc/dwarf2out.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/guality/pr41353-2.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/guality/pr41404-1.c [new file with mode: 0644]