blob: b31f95fa3b8a2eadfac9893b2a288cf8c64520f3 [file] [log] [blame]
Eric Christopher335552e2011-08-19 23:08:33 +00001// RUN: %clang_cc1 -emit-llvm %s -o -
2
3
4#ifdef PACKED
5// This is an example where size of Packed struct is smaller then
6// the size of bit field type.
7#define P __attribute__((packed))
8#else
9#define P
10#endif
11
12struct P M_Packed {
13 unsigned long long X:50;
14 unsigned Y:2;
15};
16
17struct M_Packed sM_Packed;
18
19int testM_Packed (void) {
20 struct M_Packed x;
21 return (0 != x.Y);
22}
23
24int testM_Packed2 (void) {
25 struct M_Packed x;
26 return (0 != x.X);
27}