blob: 8392c0b94a5289e1902599c50d4549f833251c3b [file] [log] [blame]
Devang Patel2f6ba652007-05-17 06:22:12 +00001// RUN: %llvmgxx %s -emit-llvm -S -o -
2
3#pragma reverse_bitfields on
4typedef unsigned long UINT32;
5
6extern void abort(void);
7
8typedef struct TestStruct
9{
10 long first: 15,
11 second: 17;
12} TestStruct;
13
14int 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}