pr30313.c (struct S): Make sure the bit-field is exactly as wide as an int.

* gcc.dg/torture/pr30313.c (struct S): Make sure the bit-field is
	  exactly as wide as an int.

From-SVN: r126906
This commit is contained in:
Rask Ingemann Lambertsen 2007-07-25 12:54:52 +02:00 committed by Rask Ingemann Lambertsen
parent 107f82d2b0
commit 024fefe28f
2 changed files with 13 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2007-07-25 Rask Ingemann Lambertsen <rask@sygehus.dk>
* gcc.dg/torture/pr30313.c (struct S): Make sure the bit-field is
exactly as wide as an int.
2007-07-25 Danny Smith <dannysmith@users.sourceforge.net>
* gcc.dg/compat/struct-layout-1_generate.c (COMPAT_PRLL):

View File

@ -4,7 +4,15 @@ static inline void bar(){}
struct S
{
#if __INT_MAX__ == 32767
signed int i: 16;
#elif __INT_MAX__ == 2147483647
signed int i: 32;
#elif __INT_MAX__ == 9223372036854775807
signed int i: 64;
#else
#error Please add support for your target here
#endif
};
int main()