http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52979
--- Comment #6 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-04-24 11:57:53 UTC --- But it uses TYPE_SIZE_UNIT to constrain it which is 5, and maxbitsize 40. Which then leads to a representative of BLKmode via if (mode == VOIDmode) { /* We really want a BLKmode representative only as a last resort, considering the member b in struct { int a : 7; int b : 17; int c; } __attribute__((packed)); Otherwise we simply want to split the representative up allowing for overlaps within the bitfield region as required for struct { int a : 7; int b : 7; int c : 10; int d; } __attribute__((packed)); [0, 15] HImode for a and b, [8, 23] HImode for c. */ DECL_SIZE (repr) = bitsize_int (bitsize); DECL_SIZE_UNIT (repr) = size_int (bitsize / BITS_PER_UNIT); DECL_MODE (repr) = BLKmode; TREE_TYPE (repr) = build_array_type_nelts (unsigned_char_type_node, bitsize / BITS_PER_UNIT); so - where does it go wrong then?