]> git.ipfire.org Git - thirdparty/gcc.git/commit
re PR debug/39372 (Missing DW_AT_location for constructor static variable)
authorJakub Jelinek <jakub@redhat.com>
Fri, 6 Mar 2009 22:49:39 +0000 (23:49 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 6 Mar 2009 22:49:39 +0000 (23:49 +0100)
commit9f0e7885bb87904aac629a6c9aa3df4156667c08
tree645eb9edc055f339bd8caceb0c87f633d148625c
parent3b664bd1dab8cf90edd168913e8bf50bb262343a
re PR debug/39372 (Missing DW_AT_location for constructor static variable)

PR debug/39372
* dwarf2out.c (add_abstract_origin_attribute): Return
origin_die.
(gen_variable_die): Emit DW_AT_location on abstract static variable's
DIE, don't emit it if abstract origin already has it.
* tree-cfg.c (remove_useless_stmts_bind): GIMPLE_BINDs with any
BLOCK_NONLOCALIZED_VARS in its gimple_bind_block aren't useless.

* g++.dg/debug/dwarf2/static-local-var-in-ctor.C: New test.

From-SVN: r144682
gcc/ChangeLog
gcc/dwarf2out.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/debug/dwarf2/static-local-var-in-ctor.C [new file with mode: 0644]
gcc/tree-cfg.c