summaryrefslogtreecommitdiff
path: root/gcc/stor-layout.c
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2010-03-30 05:56:03 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2010-03-30 05:56:03 +0000
commitd2b004c8b7e7722f965ccfdb5fcd816bfb9096ca (patch)
tree0acac91421018e5df03bdb8218676a5832963665 /gcc/stor-layout.c
parentf3076b56ea763d1e69d22d6fcd104bed9a11f166 (diff)
downloadgcc-d2b004c8b7e7722f965ccfdb5fcd816bfb9096ca.tar.gz
2010-03-30 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 157811 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@157814 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/stor-layout.c')
-rw-r--r--gcc/stor-layout.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c
index 1806c12189a..18c74cb6107 100644
--- a/gcc/stor-layout.c
+++ b/gcc/stor-layout.c
@@ -1346,11 +1346,12 @@ place_field (record_layout_info rli, tree field)
until we see a bitfield (and come by here again) we just skip
calculating it. */
if (DECL_SIZE (field) != NULL
- && host_integerp (TYPE_SIZE (TREE_TYPE (field)), 0)
- && host_integerp (DECL_SIZE (field), 0))
+ && host_integerp (TYPE_SIZE (TREE_TYPE (field)), 1)
+ && host_integerp (DECL_SIZE (field), 1))
{
- HOST_WIDE_INT bitsize = tree_low_cst (DECL_SIZE (field), 1);
- HOST_WIDE_INT typesize
+ unsigned HOST_WIDE_INT bitsize
+ = tree_low_cst (DECL_SIZE (field), 1);
+ unsigned HOST_WIDE_INT typesize
= tree_low_cst (TYPE_SIZE (TREE_TYPE (field)), 1);
if (typesize < bitsize)