Re: [patch] fix test gcc.dg/bf-ms-layout.c

2012-04-26 Thread Kai Tietz
2012/4/26 Janis Johnson janis_john...@mentor.com:
 A couple of months ago Kai Tietz fixed several tests for MS layout of
 bitfields, including:

    2012-02-23  Kai Tietz  kti...@redhat.com

        * gcc.dg/bf-ms-layout-2.c: Adjust offsets to fit ms-bitfield
        structure-layout.

 He missed changes to gcc.dg/bf-ms-layout.c which has the same layouts
 as bf-ms-layout-2.c but uses a command line option while the other uses
 attributes.  Test gcc.dg/bf-ms-layout.c currently fails on mainline for
 i686-mingw32.

 This patch fixes the expected offsets in bf-ms-layout.c to match those
 in the modified test, bf-ms-layout-2.c.  OK for mainline?

Janis,

yes, patch is ok.

Thanks,
Kai


[patch] fix test gcc.dg/bf-ms-layout.c

2012-04-25 Thread Janis Johnson
A couple of months ago Kai Tietz fixed several tests for MS layout of
bitfields, including:

2012-02-23  Kai Tietz  kti...@redhat.com

* gcc.dg/bf-ms-layout-2.c: Adjust offsets to fit ms-bitfield
structure-layout.

He missed changes to gcc.dg/bf-ms-layout.c which has the same layouts
as bf-ms-layout-2.c but uses a command line option while the other uses
attributes.  Test gcc.dg/bf-ms-layout.c currently fails on mainline for
i686-mingw32.

This patch fixes the expected offsets in bf-ms-layout.c to match those
in the modified test, bf-ms-layout-2.c.  OK for mainline?

Janis
2012-04-25  Janis Johnson  jani...@codesourcery.com

gcc/testsuite/
* gcc.dg/bf-ms-layout.c: Adjust offsets to fit ms-bitfield
structure layout.

Index: gcc/testsuite/gcc.dg/bf-ms-layout.c
===
--- gcc/testsuite/gcc.dg/bf-ms-layout.c (revision 186845)
+++ gcc/testsuite/gcc.dg/bf-ms-layout.c (working copy)
@@ -153,27 +153,27 @@
   struct ten test_ten;
 
 #if defined (_TEST_MS_LAYOUT) || defined (_MSC_VER)
-  size_t exp_sizeof_one = 12;
-  size_t exp_sizeof_two = 16;
+  size_t exp_sizeof_one = 8;
+  size_t exp_sizeof_two = 12;
   size_t exp_sizeof_three =6;
   size_t exp_sizeof_four = 8;
   size_t exp_sizeof_five = 3;
   size_t exp_sizeof_six = 8;
   size_t exp_sizeof_seven = 3;
-  size_t exp_sizeof_eight = 4;
+  size_t exp_sizeof_eight = 2;
   size_t exp_sizeof_nine = 8;
-  size_t exp_sizeof_ten = 16;
+  size_t exp_sizeof_ten = 8;
 
-  unsigned char exp_one_c = 8;
-  unsigned char exp_two_c  = 12;
+  unsigned char exp_one_c = 7;
+  unsigned char exp_two_c  = 9;
   unsigned char exp_three_c = 4;
   unsigned char exp_four_c = 4;
   char exp_five_c = 2;
   char exp_six_c = 5;
   char exp_seven_c = 2;
-  char exp_eight_c = 2;
+  char exp_eight_c = 1;
   char exp_nine_c = 0;
-  char exp_ten_c = 8;
+  char exp_ten_c = 1;
 
 #else /* testing -mno-ms-bitfields */