aboutsummaryrefslogtreecommitdiff
path: root/gcc/dwarf2out.c
diff options
context:
space:
mode:
authorSterling Augustine <saugustine@google.com>2012-11-14 23:36:50 +0000
committerSterling Augustine <sterling@gcc.gnu.org>2012-11-14 23:36:50 +0000
commitbc6a33956f5acf154d10dca6a48883a4398a25fc (patch)
treea5927525f46bb452ca3b97fef820330a0682def9 /gcc/dwarf2out.c
parent99ace34a31c9d1220d10ac6f6089038976732df1 (diff)
downloadgcc-bc6a33956f5acf154d10dca6a48883a4398a25fc.zip
gcc-bc6a33956f5acf154d10dca6a48883a4398a25fc.tar.gz
gcc-bc6a33956f5acf154d10dca6a48883a4398a25fc.tar.bz2
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
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;