Add include needed for MSVC.
[clang/acc.git] / test / CodeGen / union.c
blob4884690f3fdc11fc209e2a2d374a46810645f304
1 // RUN: clang-cc %s -emit-llvm -o -
3 union u_tag {
4 int a;
5 float b;
6 } u;
8 void f() {
9 u.b = 11;
12 float get_b(union u_tag *my_u) {
13 return my_u->b;
16 int f2( float __x ) {
17 union{
18 float __f;
19 unsigned int __u;
20 }__u;
21 return (int)(__u.__u >> 31);
24 typedef union { int i; int *j; } value;
26 int f3(value v) {
27 return *v.j;
30 enum E9 { one, two };
31 union S65 { enum E9 a; } ; union S65 s65;
32 void fS65() { enum E9 e = s65.a; }
34 typedef union{
35 unsigned char x[65536];
36 } q;
37 int qfunc() {q buf; unsigned char* x = buf.x;}
39 union RR {_Bool a : 1;} RRU;
40 int RRF(void) {return RRU.a;}