diff options
author | Andy Hutchinson <hutchinsonandy@gcc.gnu.org> | 2009-11-23 22:21:21 +0000 |
---|---|---|
committer | Andy Hutchinson <hutchinsonandy@gcc.gnu.org> | 2009-11-23 22:21:21 +0000 |
commit | 83a4e6e9928c2ddaf715f05cc729104200bf17c9 (patch) | |
tree | f9b6fe909f459591bcae54b0023583f701f4d61d | |
parent | dc8926ce361b1975363772f6db56b5e62ce6da23 (diff) | |
download | gcc-83a4e6e9928c2ddaf715f05cc729104200bf17c9.zip gcc-83a4e6e9928c2ddaf715f05cc729104200bf17c9.tar.gz gcc-83a4e6e9928c2ddaf715f05cc729104200bf17c9.tar.bz2 |
* gcc.dg/torture/pr37868.c: Use smaller bitfield for 16bit int targets.
From-SVN: r154474
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/torture/pr37868.c | 12 |
2 files changed, 16 insertions, 1 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 68bd7ba..a91a1bf 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,10 @@ 2009-11-23 Andy Hutchinson <hutchinsonandy@gcc.gnu.org> + * gcc.dg/torture/pr37868.c: Use smaller bitfield for 16bit int + targets. + +2009-11-23 Andy Hutchinson <hutchinsonandy@gcc.gnu.org> + * gcc.dg/tree-ssa/pr33920.c: Remove warning check for 16 bit target. 2009-11-23 Andy Hutchinson <hutchinsonandy@gcc.gnu.org> diff --git a/gcc/testsuite/gcc.dg/torture/pr37868.c b/gcc/testsuite/gcc.dg/torture/pr37868.c index 50fa903..1f89dff 100644 --- a/gcc/testsuite/gcc.dg/torture/pr37868.c +++ b/gcc/testsuite/gcc.dg/torture/pr37868.c @@ -3,7 +3,14 @@ /* { dg-skip-if "unaligned access" { sparc*-*-* } "*" "" } */ extern void abort (void); - +#if (__SIZEOF_INT__ <= 2) +struct X { + unsigned char pad : 4; + unsigned int a : 16; + unsigned int b : 8; + unsigned int c : 6; +} __attribute__((packed)); +#else struct X { unsigned char pad : 4; unsigned int a : 32; @@ -11,6 +18,9 @@ struct X { unsigned int c : 6; } __attribute__((packed)); +#endif + + int main (void) { struct X x; |