1 // RUN: %clang_cc1 -fblocks %s -emit-llvm -o %t
3 extern "C" int printf(const char*, ...);
5 template<typename T
> class range
{
14 A() : field(10), d1(3.14) {}
17 printf(" field = %d\n", field
);
18 printf(" field = %f\n", d1
);
26 __block A
&tlc
= *this;
27 // crashed in code gen
34 void (^bl
)(range
<int> ) = ^(range
<int> i
){printf("Hello Blocks %d\n", i
.get()); };
37 void (^bl2
)(range
<int>& ) = ^(range
<int>& i
){printf("Hello Blocks %d\n", i
.get()); };