From: Jason Merrill Date: Wed, 26 Nov 1997 07:32:52 +0000 (+0000) Subject: dwarfout.c (output_type): If finalizing, write out nested types of types we've alread... X-Git-Tag: releases/egcs-1.0.0~54 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=81d76e38218a10a2a5418c179a353d3e6c05f603;p=thirdparty%2Fgcc.git dwarfout.c (output_type): If finalizing, write out nested types of types we've already written. * dwarfout.c (output_type): If finalizing, write out nested types of types we've already written. From-SVN: r16723 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d05260872e6a..1e4552bf07fd 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Tue Nov 25 22:43:30 1997 Jason Merrill + + * 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 * sh/elf.h (PREFERRED_DEBUGGING_TYPE): Undefine before including diff --git a/gcc/dwarfout.c b/gcc/dwarfout.c index 07639e8c73d4..c3d7f82ce745 100644 --- a/gcc/dwarfout.c +++ b/gcc/dwarfout.c @@ -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. */