From: ian Date: Wed, 27 Dec 2006 21:48:05 +0000 (+0000) Subject: PR debug/26964 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3d9b511b942394a349643ca9b73c89502e79d090;p=thirdparty%2Fgcc.git PR debug/26964 * dwarf2out.c (gen_type_die): Don't write out a DIE for ENUMERAL_TYPE if it was already written out. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120221 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d9a15356b217..6a9a3377994b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2006-12-27 Ian Lance Taylor + + PR debug/26964 + * dwarf2out.c (gen_type_die): Don't write out a DIE for + ENUMERAL_TYPE if it was already written out. + 2006-12-26 Kaveh R. Ghazi PR middle-end/29335 diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 54e2c3342a2f..6cd343553949 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -12725,7 +12725,12 @@ gen_type_die (tree type, dw_die_ref context_die) } if (TREE_CODE (type) == ENUMERAL_TYPE) - gen_enumeration_type_die (type, context_die); + { + /* This might have been written out by the call to + declare_in_namespace. */ + if (!TREE_ASM_WRITTEN (type)) + gen_enumeration_type_die (type, context_die); + } else gen_struct_or_union_type_die (type, context_die);