1 // RUN: %clang_cc1 -fsyntax-only -verify -triple i686-apple-darwin9 -std=c++11 %s
2 // expected-no-diagnostics
3 
4 #pragma ms_struct on
5 
6 struct A {
7   unsigned long a:4;
8   unsigned char b;
9 };
10 
11 struct B : public A {
12   unsigned long c:16;
13 	int d;
14   B();
15 };
16 
17 static_assert(__builtin_offsetof(B, d) == 12,
18   "We can't allocate the bitfield into the padding under ms_struct");