Blame SOURCES/gcc32-dwarf2-pruning-keep-spec.patch

4ac4fd
2004-08-13  Alexandre Oliva  <aoliva@redhat.com>
4ac4fd
4ac4fd
	* dwarf2out.c (prune_unused_types_walk): Mark the specification if
4ac4fd
	the declaration is marked.
4ac4fd
4ac4fd
--- gcc/dwarf2out.c	2004-08-13 04:46:06.000000000 -0300
4ac4fd
+++ gcc/dwarf2out.c	2004-08-13 04:47:21.904025637 -0300
4ac4fd
@@ -12364,6 +12364,12 @@ prune_unused_types_walk (die)
4ac4fd
     return;
4ac4fd
 
4ac4fd
   switch (die->die_tag) {
4ac4fd
+  case DW_TAG_structure_type:
4ac4fd
+    /* If the declaration is marked, mark the specification as well.  */
4ac4fd
+    if ((c = get_AT_ref (die, DW_AT_specification)) != NULL
4ac4fd
+	&& c->die_mark)
4ac4fd
+      break;
4ac4fd
+
4ac4fd
   case DW_TAG_const_type:
4ac4fd
   case DW_TAG_packed_type:
4ac4fd
   case DW_TAG_pointer_type:
4ac4fd
@@ -12371,7 +12377,6 @@ prune_unused_types_walk (die)
4ac4fd
   case DW_TAG_volatile_type:
4ac4fd
   case DW_TAG_typedef:
4ac4fd
   case DW_TAG_array_type:
4ac4fd
-  case DW_TAG_structure_type:
4ac4fd
   case DW_TAG_union_type:
4ac4fd
   case DW_TAG_class_type:
4ac4fd
   case DW_TAG_friend: