brintos

brintos / llvm-project-archived public Read only

0
0
Text · 456 B · 6807f5a Raw
31 lines · c
1// RUN: %clang_cc1 -w -emit-llvm %s  -o /dev/null2 3 4typedef struct BF {5  int A : 1;6  char B;7  int C : 13;8} BF;9 10char *test1(BF *b) {11  return &b->B;        // Must be able to address non-bitfield12}13 14void test2(BF *b) {    // Increment and decrement operators15  b->A++;16  --b->C;17}18 19void test3(BF *b) {20   b->C = 12345;        // Store21}22 23int test4(BF *b) {24  return b->C;         // Load25}26 27void test5(BF *b, int i) { // array ref28  b[i].C = 12345;29}30 31