summaryrefslogtreecommitdiffstats
path: root/contrib/gcc
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2012-12-28 22:06:50 +0000
committerpfg <pfg@FreeBSD.org>2012-12-28 22:06:50 +0000
commitbd8e345ca3212f607bc453c1c860e364601c1522 (patch)
treee757e612cccfc1a00cfdaa17451d2d6eb1a23aba /contrib/gcc
parentcb6e78502588538225efe3e16bec09d07c25439e (diff)
downloadFreeBSD-src-bd8e345ca3212f607bc453c1c860e364601c1522.zip
FreeBSD-src-bd8e345ca3212f607bc453c1c860e364601c1522.tar.gz
gcc: avoid generating negative values to DW_AT_byte_size.
The previous change was actually a NOP because size is unsigned and compilers are dumb. Submitted by: Christoph Mallon MFC after: 1 week
Diffstat (limited to 'contrib/gcc')
-rw-r--r--contrib/gcc/dwarf2out.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/gcc/dwarf2out.c b/contrib/gcc/dwarf2out.c
index 453e653..5e4354a 100644
--- a/contrib/gcc/dwarf2out.c
+++ b/contrib/gcc/dwarf2out.c
@@ -10814,7 +10814,7 @@ add_byte_size_attribute (dw_die_ref die, tree tree_node)
indicates that the byte size of the entity in question is variable. We
have no good way of expressing this fact in Dwarf at the present time.
GCC/35998: Avoid passing negative sizes to Dtrace and gdb. */
- add_AT_unsigned (die, DW_AT_byte_size, (size > 0 ? size : 0));
+ add_AT_unsigned (die, DW_AT_byte_size, (size != (unsigned)-1 ? size : 0));
}
/* For a FIELD_DECL node which represents a bit-field, output an attribute
OpenPOWER on IntegriCloud