Home | History | Annotate | Download | only in CodeGen
      1 // RUN: %clang_cc1 -emit-llvm-only  -triple i386-apple-darwin9 %s
      2 // rdar://8823265
      3 
      4 #define ATTR __attribute__((__ms_struct__))
      5 
      6 struct _struct_0
      7 {
      8   int  member_0   : 25 ;
      9   short  member_1   : 6 ;
     10   char  member_2   : 2 ;
     11   unsigned  short  member_3   : 1 ;
     12   unsigned  char  member_4   : 7 ;
     13   short  member_5   : 16 ;
     14   int  : 0 ;
     15   char  member_7  ;
     16 
     17 } ATTR;
     18 
     19 typedef struct _struct_0 struct_0;
     20 
     21 #define size_struct_0 20
     22 
     23 struct_0 test_struct_0 = { 18557917, 17, 3, 0, 80, 6487, 93 };
     24 static int a[(size_struct_0 == sizeof (struct_0)) -1];
     25 
     26 struct _struct_1 {
     27   int d;
     28   unsigned char a;
     29   unsigned short b:7;
     30   char c;
     31 } ATTR;
     32 
     33 typedef struct _struct_1 struct_1;
     34 
     35 #define size_struct_1 12
     36 
     37 struct_1 test_struct_1 = { 18557917, 'a', 3, 'b' };
     38 
     39 static int a1[(size_struct_1 == sizeof (struct_1)) -1];
     40 
     41 struct ten {
     42   long long a:3;
     43   long long b:3;
     44   char c;
     45 } __attribute__ ((ms_struct));
     46 
     47 #define size_struct_2 16
     48 
     49 static int a2[(size_struct_2 == sizeof (struct ten)) -1];
     50