OSDN Git Service

(output_type): Do early exit only if TYPE_CONTEXT is NULL
authorwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 12 Feb 1997 20:39:27 +0000 (20:39 +0000)
committerwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 12 Feb 1997 20:39:27 +0000 (20:39 +0000)
or if TYPE_CONTEXT is another type (e.g. a nested type).

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@13630 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/dwarfout.c

index 8c5ea39..e5aa747 100644 (file)
@@ -4248,7 +4248,10 @@ output_type (type, containing_scope)
           can safely generate correct Dwarf descriptions for these file-
           scope tagged types.  */
 
-       if (TYPE_SIZE (type) == 0 && !finalizing)
+       if (TYPE_SIZE (type) == 0
+           && (TYPE_CONTEXT (type) == NULL
+               || TREE_CODE_CLASS (TREE_CODE (TYPE_CONTEXT (type))) == 't')
+           && !finalizing)
          return;       /* EARLY EXIT!  Avoid setting TREE_ASM_WRITTEN.  */
 
        /* Prevent infinite recursion in cases where the type of some