]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
dwarf2out.c (gen_struct_or_union_type_die): Only remember types on the permanent_obstack.
authorJason Merrill <jason@yorick.cygnus.com>
Wed, 7 Jul 1999 00:15:29 +0000 (18:15 -0600)
committerJeff Law <law@gcc.gnu.org>
Wed, 7 Jul 1999 00:15:29 +0000 (18:15 -0600)
p
* dwarf2out.c (gen_struct_or_union_type_die): Only remember types
on the permanent_obstack.
* dwarfout.c (output_type): Likewise.

From-SVN: r27967

gcc/dwarf2out.c
gcc/dwarfout.c

index f75d2c1e4b72dc00920b9a8bcf4ecdc2ae07cf5d..2e29c72c359852332eaa3c1ed9c58ce39437d637 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 9c419a8bca1df1ea93a409d9c4db78621a5b2549..0a30a9775cfb1d48e86c2490a4f64374befa3728 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.  */
          }