summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/union.c
blob: 8102f9b6fd737b07114178735771642f1ece159b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// RUN: clang %s -emit-llvm

union {
  int a;
  float b;
} u;

void f() {
  u.b = 11;
}

int f2( float __x ) { 
  union{ 
    float __f; 
    unsigned int __u; 
  }__u;
  return (int)(__u.__u >> 31); 
}
OpenPOWER on IntegriCloud