re PR debug/55328 (ICE: in output_addr_table_entry, at dwarf2out.c:21780 with -gsplit-dwarf)

2012-11-14  Sterling Augustine  <saugustine@google.com>

	PR debug/55328
	* dwarf2out.c (index_address_table_entry): Check a node's refcount.

From-SVN: r193515
This commit is contained in:
Sterling Augustine 2012-11-14 23:36:50 +00:00 committed by Sterling Augustine
parent 99ace34a31
commit bc6a33956f
2 changed files with 9 additions and 0 deletions

View file

@ -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

View file

@ -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;