From: Ian Lance Taylor Date: Wed, 27 Dec 2006 23:39:58 +0000 (+0000) Subject: re PR debug/26964 (Duplicate debug info for enums in namespaces) X-Git-Tag: releases/gcc-4.0.4~116 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4c5a602e8546bb2593d10b0dc2a1858f10fe4759;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: r120225 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3da6b308d2ef..154a3ca059ab 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-08 John David Anglin PR target/30039 diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 94c2bab9a144..96d6f302fc2c 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -12265,7 +12265,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);