* gcc.dg/torture/pr37868.c: Use smaller bitfield for 16bit int targets.
authorhutchinsonandy <hutchinsonandy@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 23 Nov 2009 22:21:21 +0000 (22:21 +0000)
committerhutchinsonandy <hutchinsonandy@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 23 Nov 2009 22:21:21 +0000 (22:21 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@154474 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/torture/pr37868.c

index 68bd7ba..a91a1bf 100644 (file)
@@ -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>
index 50fa903..1f89dff 100644 (file)
@@ -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;