blob: eb4990a3df6cf795b9c42c59810e2f3023854fba [file] [log] [blame]
Mike Stump68df15c2009-05-21 21:05:15 +00001// RUN: clang-cc -fblocks -triple x86_64-apple-darwin10 -emit-llvm -o %t %s &&
2// RUN: grep '%call = call i32 (...)\* @rhs()' %t | count 1 &&
3// If this fails, see about sliding %4 and %5...
4// RUN: grep '%forwarding1 = getelementptr %0\* %i, i32 0, i32 1' %t | count 1 &&
5// RUN: grep '%4 = bitcast i8\*\* %forwarding1 to %0\*\*' %t | count 1 &&
6// RUN: grep '%5 = load %0\*\* %4' %t | count 1
7
8int rhs();
9
10void foo() {
11 __block int i;
12 i = rhs();
13}