Insure that __block_holder_tmp is allocated on the stack when a byref
[oota-llvm.git] / test / FrontendC++ / 2009-06-30-ByrefBlock.cpp
1 // Insure __block_holder_tmp is allocated on the stack.
2 // RUN: %llvmgxx %s -S -O2 -o - | egrep {__block_holder_tmp.*alloca}
3 // <rdar://problem/5865221>
4 extern void fubar_dispatch_sync(void (^PP)(void));
5 void fubar() {
6   __block void *voodoo;
7  fubar_dispatch_sync(^(void){voodoo=0;});
8 }