Several g++ tests in tmpdir-g++.dg-struct-layout-1 fail during the compilation with the error message like
error: size of array 'foo' is too large with -mms-bitfields. A reduced testcase is typedef long int along __attribute__((aligned (32))); struct S { unsigned char a; along d:130; int e:66; } A[1]; It looks the ms-bitfield code in stor-layout.c doesn't take the bit field with excessive size into account and it makes the negative remaining_in_alignment which causes the above error. -- Summary: Bogus "size of array 'foo' is too large" error with - mms-bitfields Product: gcc Version: 4.2.0 Status: UNCONFIRMED Keywords: rejects-valid Severity: normal Priority: P3 Component: middle-end AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: kkojima at gcc dot gnu dot org GCC build triplet: i686-pc-linux-gnu GCC host triplet: i686-pc-linux-gnu GCC target triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28160