aboutsummaryrefslogtreecommitdiff
path: root/gcc/dwarf2out.c
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2003-07-20 07:24:58 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>2003-07-20 07:24:58 +0000
commit35dc2bd884bfe86de76ff1b9937d63d6043f4d1f (patch)
tree815198fd0b374bc22f14f9c22e0504e0c17b0b42 /gcc/dwarf2out.c
parente9f9c81fda3eeb9a7de0ce2dca9f92bf08355d62 (diff)
downloadgcc-35dc2bd884bfe86de76ff1b9937d63d6043f4d1f.zip
gcc-35dc2bd884bfe86de76ff1b9937d63d6043f4d1f.tar.gz
gcc-35dc2bd884bfe86de76ff1b9937d63d6043f4d1f.tar.bz2
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
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r--gcc/dwarf2out.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 3689271..591d2da 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -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));
}
}
}