From: Jason Merrill Date: Wed, 7 Jul 1999 00:15:29 +0000 (-0600) Subject: dwarf2out.c (gen_struct_or_union_type_die): Only remember types on the permanent_obstack. X-Git-Tag: prereleases/gcc-2.95-test~77 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=616ee901343ce558fb279aa3d411efd0817b117a;p=thirdparty%2Fgcc.git dwarf2out.c (gen_struct_or_union_type_die): Only remember types on the permanent_obstack. p * dwarf2out.c (gen_struct_or_union_type_die): Only remember types on the permanent_obstack. * dwarfout.c (output_type): Likewise. From-SVN: r27967 --- diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index f75d2c1e4b72..2e29c72c3598 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -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); } } diff --git a/gcc/dwarfout.c b/gcc/dwarfout.c index 9c419a8bca1d..0a30a9775cfb 100644 --- a/gcc/dwarfout.c +++ b/gcc/dwarfout.c @@ -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. */ }