aboutsummaryrefslogtreecommitdiff
path: root/gcc/dwarf2out.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r--gcc/dwarf2out.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 823b497..c5559c8 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;