]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
dwarfout.c (output_type): If finalizing, write out nested types of types we've alread...
authorJason Merrill <jason@yorick.cygnus.com>
Wed, 26 Nov 1997 07:32:52 +0000 (07:32 +0000)
committerJeff Law <law@gcc.gnu.org>
Wed, 26 Nov 1997 07:32:52 +0000 (00:32 -0700)
        * dwarfout.c (output_type): If finalizing, write out nested types
        of types we've already written.

From-SVN: r16723

gcc/ChangeLog
gcc/dwarfout.c

index d05260872e6a004dbadf6cba785542840cd973cc..1e4552bf07fd7de1771f4d7c07ae6671c59893db 100644 (file)
@@ -1,3 +1,8 @@
+Tue Nov 25 22:43:30 1997  Jason Merrill  <jason@yorick.cygnus.com>
+
+       * dwarfout.c (output_type): If finalizing, write out nested types 
+       of types we've already written.
+
 Tue Nov 25 10:00:42 1997  J"orn Rennecke <amylaar@cygnus.co.uk>
 
        * sh/elf.h (PREFERRED_DEBUGGING_TYPE): Undefine before including
index 07639e8c73d4c1f920f6d2bed611533aeb9c6fd8..c3d7f82ce7450cd101653fedacfc91a76145297a 100644 (file)
@@ -4178,7 +4178,22 @@ output_type (type, containing_scope)
   type = type_main_variant (type);
 
   if (TREE_ASM_WRITTEN (type))
-    return;
+    {
+      if (finalizing && AGGREGATE_TYPE_P (type))
+       {
+         register tree member;
+
+         /* Some of our nested types might not have been defined when we
+            were written out before; force them out now.  */
+
+         for (member = TYPE_FIELDS (type); member;
+              member = TREE_CHAIN (member))
+           if (TREE_CODE (member) == TYPE_DECL
+               && ! TREE_ASM_WRITTEN (TREE_TYPE (member)))
+             output_type (TREE_TYPE (member), containing_scope);
+       }
+      return;
+    }
 
   /* If this is a nested type whose containing class hasn't been
      written out yet, writing it out will cover this one, too.  */