opnsense-src/test/FrontendC++/2009-06-30-ByrefBlock.cpp

12 lines
340 B
C++
Raw Normal View History

2009-10-14 13:57:32 -04:00
// Insure __block_holder_tmp is allocated on the stack. Darwin only.
2009-07-04 09:58:26 -04:00
// RUN: %llvmgxx %s -S -O2 -o - | egrep {__block_holder_tmp.*alloca}
2009-10-14 13:57:32 -04:00
// XFAIL: *
// XTARGET: darwin
2009-07-04 09:58:26 -04:00
// <rdar://problem/5865221>
2009-10-14 13:57:32 -04:00
// END.
2009-07-04 09:58:26 -04:00
extern void fubar_dispatch_sync(void (^PP)(void));
void fubar() {
__block void *voodoo;
fubar_dispatch_sync(^(void){voodoo=0;});
}