diff options
author | Jeff Law <law@gcc.gnu.org> | 1997-11-02 14:19:36 -0700 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1997-11-02 14:19:36 -0700 |
commit | e9a25f70a0a7b82881b56cb3dfa7422b2968682a (patch) | |
tree | 46fe768360493f03f7282d07762e7b26c292aabd /gcc/stor-layout.c | |
parent | bb84e66919817020267815eed4304e543688e722 (diff) | |
download | gcc-e9a25f70a0a7b82881b56cb3dfa7422b2968682a.zip gcc-e9a25f70a0a7b82881b56cb3dfa7422b2968682a.tar.gz gcc-e9a25f70a0a7b82881b56cb3dfa7422b2968682a.tar.bz2 |
Update mainline egcs to gcc2 snapshot 971021.
From-SVN: r16278
Diffstat (limited to 'gcc/stor-layout.c')
-rw-r--r-- | gcc/stor-layout.c | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c index 2ccf45e..21a8f44 100644 --- a/gcc/stor-layout.c +++ b/gcc/stor-layout.c @@ -390,7 +390,7 @@ layout_record (rec) int type_align = TYPE_ALIGN (TREE_TYPE (field)); if (maximum_field_alignment != 0) type_align = MIN (type_align, maximum_field_alignment); - else if (TYPE_PACKED (rec)) + else if (DECL_PACKED (field)) type_align = MIN (type_align, BITS_PER_UNIT); record_align = MAX (record_align, type_align); @@ -464,11 +464,15 @@ layout_record (rec) if (maximum_field_alignment != 0) type_align = MIN (type_align, maximum_field_alignment); - else if (TYPE_PACKED (rec)) + /* ??? This test is opposite the test in the containing if + statement, so this code is unreachable currently. */ + else if (DECL_PACKED (field)) type_align = MIN (type_align, BITS_PER_UNIT); /* A bit field may not span the unit of alignment of its type. Advance to next boundary if necessary. */ + /* ??? This code should match the code above for the + PCC_BITFIELD_TYPE_MATTERS case. */ if (const_size / type_align != (const_size + field_size - 1) / type_align) const_size = CEIL (const_size, type_align) * type_align; @@ -694,6 +698,11 @@ layout_type (type) of the language-specific code. */ abort (); + case BOOLEAN_TYPE: /* Used for Java, Pascal, and Chill. */ + if (TYPE_PRECISION (type) == 0) + TYPE_PRECISION (type) = 1; /* default to one byte/boolean. */ + /* ... fall through ... */ + case INTEGER_TYPE: case ENUMERAL_TYPE: case CHAR_TYPE: @@ -944,18 +953,7 @@ layout_type (type) } break; - /* Pascal and Chill types */ - case BOOLEAN_TYPE: /* store one byte/boolean for now. */ - TYPE_MODE (type) = QImode; - TYPE_SIZE (type) = size_int (GET_MODE_BITSIZE (TYPE_MODE (type))); - TYPE_PRECISION (type) = 1; - TYPE_ALIGN (type) = GET_MODE_ALIGNMENT (TYPE_MODE (type)); - if (TREE_CODE (TYPE_MIN_VALUE (type)) == INTEGER_CST - && tree_int_cst_sgn (TYPE_MIN_VALUE (type)) >= 0) - TREE_UNSIGNED (type) = 1; - break; - - case SET_TYPE: + case SET_TYPE: /* Used by Chill and Pascal. */ if (TREE_CODE (TYPE_MAX_VALUE (TYPE_DOMAIN (type))) != INTEGER_CST || TREE_CODE (TYPE_MIN_VALUE (TYPE_DOMAIN (type))) != INTEGER_CST) abort(); |