blob: 37fa9a7c687caa3c8400b60b6843daccdc2ad0e2 [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;
Eli Friedmancd06f262013-06-26 20:50:34 +00009};
10
11struct B : public A {
12 unsigned long c:16;
13 int d;
14 B();
15};
16
17static_assert(__builtin_offsetof(B, d) == 12,
18 "We can't allocate the bitfield into the padding under ms_struct");