OSDN Git Service

p
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 7 Jul 1999 00:16:01 +0000 (00:16 +0000)
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 7 Jul 1999 00:16:01 +0000 (00:16 +0000)
* dwarf2out.c (gen_struct_or_union_type_die): Only remember types
on the permanent_obstack.
* dwarfout.c (output_type): Likewise.

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

gcc/dwarf2out.c
gcc/dwarfout.c

index 8b81267..5c108da 100644 (file)
@@ -9077,7 +9077,10 @@ gen_struct_or_union_type_die (type, context_die)
   else
     {
       add_AT_flag (type_die, DW_AT_declaration, 1);
-      add_incomplete_type (type);
+
+      /* We can't do this for function-local types, and we don't need to.  */
+      if (TREE_PERMANENT (type))
+       add_incomplete_type (type);
     }
 }
 
index 9c419a8..0a30a97 100644 (file)
@@ -4439,7 +4439,10 @@ output_type (type, containing_scope)
                    && TREE_CODE (TYPE_CONTEXT (type)) != METHOD_TYPE))
            && !finalizing)
          {
-           add_incomplete_type (type);
+           /* We can't do this for function-local types, and we don't need
+               to.  */
+           if (TREE_PERMANENT (type))
+             add_incomplete_type (type);
            return;     /* EARLY EXIT!  Avoid setting TREE_ASM_WRITTEN.  */
          }