From: Ian Lance Taylor Date: Wed, 27 Dec 2006 21:48:05 +0000 (+0000) Subject: re PR debug/26964 (Duplicate debug info for enums in namespaces) X-Git-Tag: releases/gcc-4.3.0~7821 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ae64e535a30ebe01bd161401617a107e773507e6;p=thirdparty%2Fgcc.git re PR debug/26964 (Duplicate debug info for enums in namespaces) PR debug/26964 * dwarf2out.c (gen_type_die): Don't write out a DIE for ENUMERAL_TYPE if it was already written out. From-SVN: r120221 --- 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);