Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / Sema / mms-bitfields.c
blobcee5b0669d252fdbcf1093742232bb8056a2ced6
1 // RUN: %clang_cc1 -mms-bitfields -fsyntax-only -verify -triple x86_64-apple-darwin9 %s
2 // expected-no-diagnostics
4 // The -mms-bitfields commandline parameter should behave the same
5 // as the ms_struct attribute.
6 struct
8 int a : 1;
9 short b : 1;
10 } t;
12 // MS pads out bitfields between different types.
13 static int arr[(sizeof(t) == 8) ? 1 : -1];
15 #pragma pack (push,1)
17 typedef unsigned int UINT32;
19 struct Inner {
20 UINT32 A : 1;
21 UINT32 B : 1;
22 UINT32 C : 1;
23 UINT32 D : 30;
24 } Inner;
26 #pragma pack (pop)
28 static int arr2[(sizeof(Inner) == 8) ? 1 : -1];