diff options
author | Geoff Keating <geoffk@cygnus.com> | 2000-08-12 22:45:05 +0000 |
---|---|---|
committer | Geoffrey Keating <geoffk@gcc.gnu.org> | 2000-08-12 22:45:05 +0000 |
commit | 2f5c7f45225f826d430a25d4a54e9e19967d3a7c (patch) | |
tree | fa69ec89bc345170fcb966cb78d9c60d962957d3 /gcc/expmed.c | |
parent | 808d8c417114a8df27fbc149f162e56f174783ac (diff) | |
download | gcc-2f5c7f45225f826d430a25d4a54e9e19967d3a7c.zip gcc-2f5c7f45225f826d430a25d4a54e9e19967d3a7c.tar.gz gcc-2f5c7f45225f826d430a25d4a54e9e19967d3a7c.tar.bz2 |
tree.h (DECL_OFFSET_ALIGN): Make the off_align field of the tree structure an exponent rather than an...
* tree.h (DECL_OFFSET_ALIGN): Make the off_align field of
the tree structure an exponent rather than an explicit alignment
so it doesn't overflow.
(SET_DECL_OFFSET_ALIGN): New macro.
* stor-layout.c (place_union_field): Use SET_DECL_OFFSET_ALIGN
rather than DECL_OFFSET_ALIGN.
(place_field): Likewise.
* expmed.c (store_bit_field): Abort on align==0 to avoid
antisocial machine behaviour.
From-SVN: r35659
Diffstat (limited to 'gcc/expmed.c')
-rw-r--r-- | gcc/expmed.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/expmed.c b/gcc/expmed.c index e9210a6..606333f 100644 --- a/gcc/expmed.c +++ b/gcc/expmed.c @@ -245,6 +245,11 @@ store_bit_field (str_rtx, bitsize, bitnum, fieldmode, value, align, total_size) insv_bitsize = GET_MODE_BITSIZE (op_mode); #endif + /* It is wrong to have align==0, since every object is aligned at + least at a bit boundary. This usually means a bug elsewhere. */ + if (align == 0) + abort (); + /* Discount the part of the structure before the desired byte. We need to know how many bytes are safe to reference after it. */ if (total_size >= 0) |