blob: e8435ca70f7a061602a23d4f85d5f1e098789bb7 [file] [log] [blame]
Chris Lattnerc6a200e2003-09-19 05:22:10 +00001
2typedef struct BF {
3 int A : 1;
4 char B;
5 int C : 13;
6} BF;
7
8char *test1(BF *b) {
9 return &b->B; // Must be able to address non-bitfield
10}
11
12void test2(BF *b) { // Increment and decrement operators
13 b->A++;
14 --b->C;
15}
16
17void test3(BF *b) {
18 b->C = 12345; // Store
19}
20
21int test4(BF *b) {
22 return b->C; // Load
23}
24
25void test5(BF *b, int i) { // array ref
26 b[i].C = 12345;
27}
28