summaryrefslogtreecommitdiff
path: root/gcc/stor-layout.c
diff options
context:
space:
mode:
authorKenneth Zadeck <zadeck@naturalbridge.com>2013-11-22 13:55:53 +0000
committerKenneth Zadeck <zadeck@gcc.gnu.org>2013-11-22 13:55:53 +0000
commit905b0e0729e63ed8909ad97b255e795f1128d9e1 (patch)
treeb7c2fda72425910e7742e745ac401f33119c0744 /gcc/stor-layout.c
parent29d78eafa6b183b41cd1f4be14dc643c36dc67f0 (diff)
downloadgcc-905b0e0729e63ed8909ad97b255e795f1128d9e1.tar.gz
2013-11-22 zadeck@naturalbridge.com
2013-11-22 zadeck@naturalbridge.com * store-layout.c (place-field): Fix hwi test and accessor mismatch. From-SVN: r205260
Diffstat (limited to 'gcc/stor-layout.c')
-rw-r--r--gcc/stor-layout.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c
index 6138b63d2d9..0a1194e2ef3 100644
--- a/gcc/stor-layout.c
+++ b/gcc/stor-layout.c
@@ -1204,7 +1204,7 @@ place_field (record_layout_info rli, tree field)
unsigned int type_align = TYPE_ALIGN (type);
tree dsize = DECL_SIZE (field);
HOST_WIDE_INT field_size = tree_to_uhwi (dsize);
- HOST_WIDE_INT offset = tree_to_shwi (rli->offset);
+ HOST_WIDE_INT offset = tree_to_uhwi (rli->offset);
HOST_WIDE_INT bit_offset = tree_to_shwi (rli->bitpos);
#ifdef ADJUST_FIELD_ALIGN
@@ -1248,7 +1248,7 @@ place_field (record_layout_info rli, tree field)
unsigned int type_align = TYPE_ALIGN (type);
tree dsize = DECL_SIZE (field);
HOST_WIDE_INT field_size = tree_to_uhwi (dsize);
- HOST_WIDE_INT offset = tree_to_shwi (rli->offset);
+ HOST_WIDE_INT offset = tree_to_uhwi (rli->offset);
HOST_WIDE_INT bit_offset = tree_to_shwi (rli->bitpos);
#ifdef ADJUST_FIELD_ALIGN
@@ -1304,7 +1304,7 @@ place_field (record_layout_info rli, tree field)
&& !integer_zerop (DECL_SIZE (field))
&& !integer_zerop (DECL_SIZE (rli->prev_field))
&& tree_fits_shwi_p (DECL_SIZE (rli->prev_field))
- && tree_fits_shwi_p (TYPE_SIZE (type))
+ && tree_fits_uhwi_p (TYPE_SIZE (type))
&& simple_cst_equal (TYPE_SIZE (type), TYPE_SIZE (prev_type)))
{
/* We're in the middle of a run of equal type size fields; make