diff options
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r-- | gcc/dwarf2out.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index eb9630c..c493d54 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -7905,8 +7905,14 @@ gen_enumeration_type_die (type, context_die) IDENTIFIER_POINTER (TREE_PURPOSE (link))); if (host_integerp (TREE_VALUE (link), 0)) - add_AT_unsigned (enum_die, DW_AT_const_value, - tree_low_cst (TREE_VALUE (link), 0)); + { + if (tree_int_cst_sgn (TREE_VALUE (link)) < 0) + add_AT_int (enum_die, DW_AT_const_value, + tree_low_cst (TREE_VALUE (link), 0)); + else + add_AT_unsigned (enum_die, DW_AT_const_value, + tree_low_cst (TREE_VALUE (link), 0)); + } } } else |