xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGen/complex-indirect.c (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -emit-llvm %s -o %t -triple=x86_64-apple-darwin10
2*f4a2713aSLionel Sambuc // RUN: FileCheck < %t %s
3*f4a2713aSLionel Sambuc 
4*f4a2713aSLionel Sambuc // Make sure this doesn't crash. We used to generate a byval here and wanted to
5*f4a2713aSLionel Sambuc // verify a valid alignment, but we now realize we can use an i16 and let the
6*f4a2713aSLionel Sambuc // backend guarantee the alignment.
7*f4a2713aSLionel Sambuc 
8*f4a2713aSLionel Sambuc void a(int,int,int,int,int,int,__complex__ char);
b(__complex__ char * y)9*f4a2713aSLionel Sambuc void b(__complex__ char *y) { a(0,0,0,0,0,0,*y); }
10*f4a2713aSLionel Sambuc // CHECK-LABEL: define void @b
11*f4a2713aSLionel Sambuc // CHECK: alloca { i8, i8 }*, align 8
12*f4a2713aSLionel Sambuc // CHECK: call void @a(i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i16 {{.*}})
13