The following avoids GCing IDENTIFIER_POINTERs referenced from
external_die_map after we clear ggc_protect_identifiers.  I never
expected those to be GCed.

LTO bootstrapped on x86_64-unknown-linux-gnu, testing in progress.
I'll wait for the reporter to confirm this fixes the observed
issue.

OK?

        PR debug/123886
        * dwarf2out.cc (sym_off_pair::sym): Remove GTY((skip)).
---
 gcc/dwarf2out.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/dwarf2out.cc b/gcc/dwarf2out.cc
index 1ad944fc1d0..31ff7ff1905 100644
--- a/gcc/dwarf2out.cc
+++ b/gcc/dwarf2out.cc
@@ -5969,7 +5969,7 @@ equate_type_number_to_die (tree type, dw_die_ref type_die)
 static dw_die_ref maybe_create_die_with_external_ref (tree);
 struct GTY(()) sym_off_pair
 {
-  const char * GTY((skip)) sym;
+  const char *sym;
   unsigned HOST_WIDE_INT off;
 };
 static GTY(()) hash_map<tree, sym_off_pair> *external_die_map;
-- 
2.51.0

Reply via email to