blob: 9ce7570a4486ae82a260fdb537cc6f24aaff05a1 [file] [log] [blame]
Fariborz Jahaniand295b822011-09-02 21:33:44 +00001// RUN: %clang_cc1 %s -emit-llvm -o - -fblocks -triple x86_64-apple-darwin10 | FileCheck %s
2// rdar://10033986
3
4typedef void (^BLOCK)(void);
5int main ()
6{
7 _Complex double c;
8 BLOCK b = ^() {
9 _Complex double z;
10 z = z + c;
11 };
12 b();
13}
14
15// CHECK: define internal void @__main_block_invoke_0
16// CHECK: [[C1:%.*]] = alloca { double, double }, align 8
Fariborz Jahanian0f2c1ce2011-09-02 21:47:51 +000017// CHECK: [[RP:%.*]] = getelementptr inbounds { double, double }* [[C1]], i32 0, i32 0
18// CHECK-NEXT: [[R:%.*]] = load double* [[RP]]
19// CHECK-NEXT: [[IP:%.*]] = getelementptr inbounds { double, double }* [[C1]], i32 0, i32 1
20// CHECK-NEXT: [[I:%.*]] = load double* [[IP]]