This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

fix bootstrap problem on some ELF ports with DWARF


I've had some reports of a bootstrap problem on some ELF ports that
use DWARF after my last patch.  I posted this patch earlier; DJ and
Paolo said it fixed the problems they saw, so I'll put it in.

Bootstrapped with C only on powerpc-darwin8.

-- 
- Geoffrey Keating <geoffk@apple.com>

===File ~/patches/gcc-dwarf-nofreedie-refcountbug.patch=====
2006-04-18  Geoffrey Keating  <geoffk@apple.com>

	* dwarf2out.c (prune_unused_types_update_strings): Don't add strings
	to hash table twice when the debug_str section has SECTION_MERGE.

Index: dwarf2out.c
===================================================================
--- dwarf2out.c	(revision 113053)
+++ dwarf2out.c	(working copy)
@@ -13998,9 +13998,8 @@
 	s->refcount++;
 	/* Avoid unnecessarily putting strings that are used less than
 	   twice in the hash table.  */
-	if (s->refcount == 2
-	    || (s->refcount == 1 
-		&& (debug_str_section->common.flags & SECTION_MERGE) != 0))
+	if (s->refcount
+	    == ((DEBUG_STR_SECTION_FLAGS & SECTION_MERGE) ? 1 : 2))
 	  {
 	    void ** slot;
 	    slot = htab_find_slot_with_hash (debug_str_hash, s->str,
============================================================


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]