re PR debug/49032 (-gstabs generates reference to deleted static variable)
authorJakub Jelinek <jakub@redhat.com>
Mon, 23 May 2011 18:07:43 +0000 (20:07 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Mon, 23 May 2011 18:07:43 +0000 (20:07 +0200)
commit9166988f2635469e9e7a85e0473df7b0eee689ee
treef455a1ce76ac8044485fea91c9fb66093a4de7f3
parent0e0d82a784effdcfab26696cab66d03ed5f22300
re PR debug/49032 (-gstabs generates reference to deleted static variable)

PR debug/49032
* dbxout.c: Include cgraph.h.
(dbxout_expand_expr): If a VAR_DECL is TREE_STATIC, not written
and without value expr, return NULL if no varpool node exists for
it or if it is not needed.
* Makefile.in (dbxout.o): Depend on $(CGRAPH_H).

* gcc.dg/debug/pr49032.c: New test.

From-SVN: r174083
gcc/ChangeLog
gcc/Makefile.in
gcc/dbxout.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/debug/pr49032.c [new file with mode: 0644]