Home | History | Annotate | Download | only in FrontendC++
      1 // RUN: %llvmgxx %s -S -o -
      2 
      3 #pragma reverse_bitfields on
      4 typedef unsigned long UINT32;
      5 
      6 extern void abort(void);
      7 
      8 typedef struct TestStruct
      9 {
     10   long	first: 15,
     11     second: 17;
     12 } TestStruct;
     13 
     14 int main (int argc, char * const argv[]) {
     15 
     16   TestStruct testStruct = {1, 0};
     17 
     18   UINT32 dw = *(UINT32 *)(&testStruct);
     19 
     20   if(!(dw & 0xFFFF))
     21     abort ();
     22 
     23   return 0;
     24 }
     25