diff options
author | geoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-08-12 22:45:05 +0000 |
---|---|---|
committer | geoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-08-12 22:45:05 +0000 |
commit | b4bb829f793b76c7dbdc7bdb91972964a715c65a (patch) | |
tree | fa69ec89bc345170fcb966cb78d9c60d962957d3 /gcc/expmed.c | |
parent | 2968054bf6e59f61e39c532c2a54f3037d8b4ff8 (diff) | |
download | gcc-b4bb829f793b76c7dbdc7bdb91972964a715c65a.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@35659 138bc75d-0d04-0410-961f-82ee72b054a4
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 e9210a680a3..606333fdbe3 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) |