int* f1() {
int x = 0;
return &x; }
int* f2(int y) {
return &y; }
int* f3(int x, int *y) {
int w = 0;
if (x)
y = &w;
return y; }
void* compound_literal(int x, int y) {
if (x)
return &(unsigned short){((unsigned short)0x22EF)};
int* array[] = {};
struct s { int z; double y; int w; };
if (y)
return &((struct s){ 2, 0.4, 5 * 8 });
void* p = &((struct s){ 42, 0.4, x ? 42 : 0 });
return p; }
void* alloca_test() {
void* p = __builtin_alloca(10);
return p; }
int array_test(int x[2]) {
return x[0]; }
struct baz {
int x;
int y[2];
};
int struct_test(struct baz byVal, int flag) {
if (flag)
return byVal.x; else {
return byVal.y[0]; }
}
typedef int (^ComparatorBlock)(int a, int b);
ComparatorBlock test_return_block(void) {
ComparatorBlock b = ^int(int a, int b){ return a > b; };
return b; }
ComparatorBlock test_return_block_with_capture(int x) {
ComparatorBlock b = ^int(int a, int b){ return a > b + x; };
return b; }
ComparatorBlock test_return_block_neg_aux(void);
ComparatorBlock test_return_block_neg(void) {
ComparatorBlock b = test_return_block_neg_aux();
return b; }
int *rdar_7523821_f2() {
int a[3];
return a; };
typedef int (^RDar10348049)(int value);
RDar10348049 test_rdar10348049(void) {
static RDar10348049 b = ^int(int x) {
return x + 2;
};
return b; }