blob: 99d3b118e6f6ef72755a8c07e68252dacdc381bd [file] [log] [blame]
/* APPLE LOCAL file radar 6083129 byref escapes */
/* { dg-options "-fblocks" } */
/* { dg-do run } */
#include <stdio.h>
void *_NSConcreteStackBlock;
void _Block_byref_assign_copy(void * dst, void *src){}
extern "C" void abort(void);
static int count;
static void _Block_byref_release(void * arg) {
++count;
}
void junk(void (^block)(void)) {
block();
}
int test() {
{
__byref int i = 10;
void (^dummy)(void) = ^{ ++i; };
junk(dummy);
}
return count;
}
int main() {
if (test() != 1)
abort();
return 0;
}