diff options
author | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-11-22 14:55:48 +0000 |
---|---|---|
committer | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-11-22 14:55:48 +0000 |
commit | e80e26dbccf3025687e6ff283d3b0ea3df323e31 (patch) | |
tree | fa066c45b21e099c0fd6d70615ac22a7b64cf45a /gcc/stor-layout.c | |
parent | c29bc60ba5560af4a645eeab1f350b470ee09513 (diff) | |
parent | 8b450f8859f22b0d3afa8edb42f3f287400d6975 (diff) | |
download | gcc-e80e26dbccf3025687e6ff283d3b0ea3df323e31.tar.gz |
Merge with trunk.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/wide-int@205263 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/stor-layout.c')
-rw-r--r-- | gcc/stor-layout.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c index 2074a82829f..839a7c2e01a 100644 --- a/gcc/stor-layout.c +++ b/gcc/stor-layout.c @@ -1198,14 +1198,13 @@ place_field (record_layout_info rli, tree field) && maximum_field_alignment == 0 && ! integer_zerop (DECL_SIZE (field)) && tree_fits_uhwi_p (DECL_SIZE (field)) - /* BUG!!! rli->offset is checked as unsigned but used as signed. */ && tree_fits_uhwi_p (rli->offset) && tree_fits_uhwi_p (TYPE_SIZE (type))) { 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 @@ -1243,14 +1242,13 @@ place_field (record_layout_info rli, tree field) && ! DECL_PACKED (field) && ! integer_zerop (DECL_SIZE (field)) && tree_fits_uhwi_p (DECL_SIZE (field)) - /* BUG!!! rli->offset is checked as unsigned but used as signed. */ && tree_fits_uhwi_p (rli->offset) && tree_fits_uhwi_p (TYPE_SIZE (type))) { 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 @@ -1306,8 +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)) - /* BUG!!! TYPE_SIZE (type) is checked as unsigned but used as signed. */ - && 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 |