From 2f5c7f45225f826d430a25d4a54e9e19967d3a7c Mon Sep 17 00:00:00 2001 From: Geoff Keating Date: Sat, 12 Aug 2000 22:45:05 +0000 Subject: 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 --- gcc/expmed.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gcc/expmed.c') 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) -- cgit v1.1