OSDN Git Service

2009-02-24 Richard Guenther <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 24 Feb 2009 14:47:30 +0000 (14:47 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 24 Feb 2009 14:47:30 +0000 (14:47 +0000)
PR debug/39285
* dwarf2out.c (gen_enumeration_type_die): Handle CONST_DECLs.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@144407 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/dwarf2out.c

index c89a3f4..3083dae 100644 (file)
@@ -1,4 +1,9 @@
 2009-02-24  Richard Guenther  <rguenther@suse.de>
+
+       PR debug/39285
+       * dwarf2out.c (gen_enumeration_type_die): Handle CONST_DECLs.
+
+2009-02-24  Richard Guenther  <rguenther@suse.de>
        Zdenek Dvorak  <ook@ucw.cz>
 
        PR tree-optimization/39233
index 2e5f032..ed165c8 100644 (file)
@@ -13234,6 +13234,9 @@ gen_enumeration_type_die (tree type, dw_die_ref context_die)
          add_name_attribute (enum_die,
                              IDENTIFIER_POINTER (TREE_PURPOSE (link)));
 
+         if (TREE_CODE (value) == CONST_DECL)
+           value = DECL_INITIAL (value);
+
          if (host_integerp (value, TYPE_UNSIGNED (TREE_TYPE (value))))
            /* DWARF2 does not provide a way of indicating whether or
               not enumeration constants are signed or unsigned.  GDB