[Heikki Kultala] This patch contains the ABI changes for the TCE target.
[clang.git] / test / CodeGen / transparent-union.c
blob97a731855c73d88d4c263bfe3cd3f3befde1ee01
1 // RUN: %clang_cc1 -Werror -triple i386-unknown-unknown -emit-llvm -o %t %s
2 // RUN: FileCheck < %t %s
3 //
4 // FIXME: Note that we don't currently get the ABI right here. f0() should be
5 // f0(i8*).
7 typedef union {
8 void *f0;
9 } transp_t0 __attribute__((transparent_union));
11 void f0(transp_t0 obj);
13 // CHECK: define void @f1_0(i32* %a0)
14 // CHECK: call void @f0(%union.transp_t0* byval %{{.*}})
15 // CHECK: call void %{{.*}}(i8* %{{[a-z0-9]*}})
16 // CHECK: }
17 void f1_0(int *a0) {
18 void (*f0p)(void *) = f0;
19 f0(a0);
20 f0p(a0);
23 void f1_1(int *a0) {
24 f0((transp_t0) { a0 });