From: Richard Kenner Date: Fri, 4 Oct 1996 11:01:47 +0000 (-0400) Subject: (layout_decl): Don't turn off DECL_BIT_FIELD if DECL's alignment is X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1fdae49c422b0984c28545888c1b69293fddef86;p=platform%2Fupstream%2Fgcc.git (layout_decl): Don't turn off DECL_BIT_FIELD if DECL's alignment is less than its type. From-SVN: r12896 --- diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c index 5aca483..c71c473 100644 --- a/gcc/stor-layout.c +++ b/gcc/stor-layout.c @@ -284,7 +284,8 @@ layout_decl (decl, known_align) && known_align % TYPE_ALIGN (type) == 0 && DECL_SIZE (decl) != 0 && (TREE_CODE (DECL_SIZE (decl)) != INTEGER_CST - || (TREE_INT_CST_LOW (DECL_SIZE (decl)) % BITS_PER_UNIT) == 0)) + || (TREE_INT_CST_LOW (DECL_SIZE (decl)) % BITS_PER_UNIT) == 0) + && DECL_ALIGN (decl) >= TYPE_ALIGN (type)) DECL_BIT_FIELD (decl) = 0; /* Evaluate nonconstant size only once, either now or as soon as safe. */