]> 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 23:39:58 +0000 (23:39 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Wed, 27 Dec 2006 23:39:58 +0000 (23:39 +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: r120225

gcc/ChangeLog
gcc/dwarf2out.c

index 3da6b308d2ef1f175737559f40ef46355fadfb82..154a3ca059abe8580127f104f9562425c4921026 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-08  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
 
        PR target/30039
index 94c2bab9a144438ff72f59f05665d28398020e69..96d6f302fc2c7313de7d17087264b709715e644d 100644 (file)
@@ -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);