blob: fd1ed904fa864316bd06ec68b2ecd8a8bfab057d [file] [log] [blame]
Eli Friedmancd06f262013-06-26 20:50:34 +00001// 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
6struct A {
7 unsigned long a:4;
8 unsigned char b;
9 A();
10};
11
12struct B : public A {
13 unsigned long c:16;
14 int d;
15 B();
16};
17
18static_assert(__builtin_offsetof(B, d) == 12,
19 "We can't allocate the bitfield into the padding under ms_struct");