]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
2013-11-22 zadeck@naturalbridge.com
authorzadeck <zadeck@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 22 Nov 2013 13:55:53 +0000 (13:55 +0000)
committerzadeck <zadeck@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 22 Nov 2013 13:55:53 +0000 (13:55 +0000)
* store-layout.c
(place-field): Fix hwi test and accessor mismatch.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@205260 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/stor-layout.c

index d1b3d54d70e55a24f33aa1930ffd80510591b88f..3ae6ec9cf0a1ff2791df4e2757aac3d372106aca 100644 (file)
@@ -1,3 +1,7 @@
+2013-11-22  zadeck@naturalbridge.com
+       * store-layout.c
+       (place-field): Fix hwi test and accessor mismatch.
+
 2013-11-22  Jakub Jelinek  <jakub@redhat.com>
 
        * expr.c (store_constructor): Allow CONSTRUCTOR with VECTOR_TYPE
index 6138b63d2d9fa96cf2d1bc00ed6f458f40864732..0a1194e2ef393316d390bc9d5a13268544a512b9 100644 (file)
@@ -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