* gcc.c-torture/execute/pr40404.c: Use long for bitfield on 16bit int targets.

From-SVN: r154487
This commit is contained in:
Andy Hutchinson 2009-11-24 01:22:52 +00:00
parent a67a5c0297
commit aa62c18876
2 changed files with 12 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2009-11-23 Andy Hutchinson <hutchinsonandy@gcc.gnu.org>
* gcc.c-torture/execute/pr40404.c: Use long for bitfield on 16bit
int targets.
2009-11-23 Andy Hutchinson <hutchinsonandy@gcc.gnu.org>
* gcc-dg/Wtype-limits.c: Add line to correct line numbers.

View File

@ -1,7 +1,14 @@
extern void abort (void);
#if (__SIZEOF_INT__ <= 2)
struct S {
unsigned long ui17 : 17;
} s;
#else
struct S {
unsigned int ui17 : 17;
} s;
#endif
int main()
{
s.ui17 = 0x1ffff;