This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/28160] New: Bogus "size of array 'foo' is too large" error with -mms-bitfields
- From: "kkojima at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Jun 2006 07:48:47 -0000
- Subject: [Bug middle-end/28160] New: Bogus "size of array 'foo' is too large" error with -mms-bitfields
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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