public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* DWARF PATCH to fix g++.dg/debug/localclass1.C ICE
@ 2015-06-11 17:50 Jason Merrill
  0 siblings, 0 replies; only message in thread
From: Jason Merrill @ 2015-06-11 17:50 UTC (permalink / raw)
  To: gcc-patches List

[-- Attachment #1: Type: text/plain, Size: 291 bytes --]

I was seeing crashes on localclass1.C for some testruns.  The issue 
turned out to be that we are doing better at pruning unnecessary debug 
info, so we end up with 'B' on limbo_die_list and never referred to. 
Let's deal with that situation.

Tested x86_64-pc-linux-gnu, applying to trunk.

[-- Attachment #2: local-dwarf.patch --]
[-- Type: text/x-patch, Size: 960 bytes --]

commit 9bff8274719d394395941353e6d98694613b9643
Author: Jason Merrill <jason@redhat.com>
Date:   Thu Jun 11 13:09:13 2015 -0400

    	* dwarf2out.c (prune_unused_types): Handle unused top-level limbo
    	dies.

diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 8a36fe8..3a92b02 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -23789,8 +23789,17 @@ prune_unused_types (void)
   if (skeleton_debug_str_hash)
     skeleton_debug_str_hash->empty ();
   prune_unused_types_prune (comp_unit_die ());
-  for (node = limbo_die_list; node; node = node->next)
-    prune_unused_types_prune (node->die);
+  for (limbo_die_node **pnode = &limbo_die_list; *pnode; )
+    {
+      node = *pnode;
+      if (!node->die->die_mark)
+	*pnode = node->next;
+      else
+	{
+	  prune_unused_types_prune (node->die);
+	  pnode = &node->next;
+	}
+    }
   for (ctnode = comdat_type_list; ctnode; ctnode = ctnode->next)
     prune_unused_types_prune (ctnode->root_die);
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-06-11 17:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-11 17:50 DWARF PATCH to fix g++.dg/debug/localclass1.C ICE Jason Merrill

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).