Stuart Hastings | b08ec10 | 2009-07-06 15:36:23 +0000 | [diff] [blame] | 1 | // Insure __block_holder_tmp is allocated on the stack. Darwin only. |
Stuart Hastings | 4b201f8 | 2009-07-01 15:40:10 +0000 | [diff] [blame] | 2 | // RUN: %llvmgxx %s -S -O2 -o - | egrep {__block_holder_tmp.*alloca} |
Stuart Hastings | b08ec10 | 2009-07-06 15:36:23 +0000 | [diff] [blame] | 3 | // XFAIL: * |
| 4 | // XTARGET: darwin |
Stuart Hastings | 4b201f8 | 2009-07-01 15:40:10 +0000 | [diff] [blame] | 5 | // <rdar://problem/5865221> |
Stuart Hastings | b08ec10 | 2009-07-06 15:36:23 +0000 | [diff] [blame] | 6 | // END. |
Stuart Hastings | 4b201f8 | 2009-07-01 15:40:10 +0000 | [diff] [blame] | 7 | extern void fubar_dispatch_sync(void (^PP)(void)); |
| 8 | void fubar() { |
| 9 | __block void *voodoo; |
| 10 | fubar_dispatch_sync(^(void){voodoo=0;}); |
| 11 | } |