summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/dwarf2out.c4
2 files changed, 9 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 109ad262df7..ee4d129d1b3 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2012-11-14 Sterling Augustine <saugustine@google.com>
+
+ PR debug/55328
+ * dwarf2out.c (index_address_table_entry): Check a node's refcount.
+
2012-11-14 Jan Hubicka <jh@suse.cz>
PR bootstrap/55051
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;
OpenPOWER on IntegriCloud