diff options
author | Sterling Augustine <saugustine@google.com> | 2012-11-14 23:36:50 +0000 |
---|---|---|
committer | Sterling Augustine <saugustine@google.com> | 2012-11-14 23:36:50 +0000 |
commit | 1b5a0a763ec8cfb3dd1f05f60e4d01a955ba2667 (patch) | |
tree | a5927525f46bb452ca3b97fef820330a0682def9 /gcc/dwarf2out.c | |
parent | 6fc08b26f9d840b856a9d224e324fd7da826459c (diff) |
2012-11-14 Sterling Augustine <saugustine@google.com>
PR debug/55328
* dwarf2out.c (index_address_table_entry): Check a node's refcount.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@193515 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r-- | gcc/dwarf2out.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 823b49732c4..c5559c869e8 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -4228,6 +4228,10 @@ index_addr_table_entry (void **h, void *v) addr_table_entry *node = (addr_table_entry *) *h; unsigned int *index = (unsigned int *) v; + /* Don't index unreferenced nodes. */ + if (node->refcount == 0) + return 1; + gcc_assert(node->index == NO_INDEX_ASSIGNED); node->index = *index; *index += 1; |