re PR debug/11279 (DWARF-2 output mishandles large enums)
PR debug/11279 * dwarf2out.c (gen_enumeration_type_die): Remember that enumerators can be unsigned. From-SVN: r69605
This commit is contained in:
parent
e9f9c81fda
commit
35dc2bd884
|
@ -1,3 +1,9 @@
|
|||
2003-07-20 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
PR debug/11279
|
||||
* dwarf2out.c (gen_enumeration_type_die): Remember that
|
||||
enumerators can be unsigned.
|
||||
|
||||
2003-07-19 Zack Weinberg <zack@codesourcery.com>
|
||||
|
||||
* c-decl.c (named_labels, shadowed_labels, label_level_chain)
|
||||
|
|
|
@ -10325,14 +10325,15 @@ gen_enumeration_type_die (tree type, dw_die_ref context_die)
|
|||
add_name_attribute (enum_die,
|
||||
IDENTIFIER_POINTER (TREE_PURPOSE (link)));
|
||||
|
||||
if (host_integerp (TREE_VALUE (link), 0))
|
||||
if (host_integerp (TREE_VALUE (link),
|
||||
TREE_UNSIGNED (TREE_TYPE (TREE_VALUE (link)))))
|
||||
{
|
||||
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));
|
||||
tree_low_cst (TREE_VALUE (link), 1));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue