]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR debug/26964 (Duplicate debug info for enums in namespaces)
authorIan Lance Taylor <iant@google.com>
Wed, 27 Dec 2006 21:48:05 +0000 (21:48 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Wed, 27 Dec 2006 21:48:05 +0000 (21:48 +0000)
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

gcc/ChangeLog
gcc/dwarf2out.c

index d9a15356b217f7a8692be12221501f15f2f2bb39..6a9a3377994bd8ad925c7d1d078fd634cc72cdd1 100644 (file)
@@ -1,3 +1,9 @@
+2006-12-27  Ian Lance Taylor  <iant@google.com>
+
+       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  <ghazi@caip.rutgers.edu>
 
        PR middle-end/29335
index 54e2c3342a2fecec5ef89b422def323fe0542778..6cd34355394930527f01cd852335987d2760d6a3 100644 (file)
@@ -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);