summaryrefslogtreecommitdiff
path: root/clang/test/CodeGen/2007-05-15-PaddingElement.c
blob: 5aa4f2e091cefe361c1485c16b6634e45c4d61a0 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// PR 1419

// RUN: %clang_cc1   -O2 %s -emit-llvm -o - | grep "ret i32 1"
struct A {
  short x;
  long long :0;
};

struct B {
  char a;
  char b;
  unsigned char i;
};

union X { struct A a; struct B b; };

int check(void) {
  union X x, y;

  y.b.i = 0xff;
  x = y;
  return (x.b.i == 0xff);
}