extern int printf(const char *, ...);
void f1(void) {
int k, y; int abc = 1;
long idx = abc + 3 * 5; }
void f2(void *b) {
char *c = (char *)b; char *d = b + 1;
printf("%s", c);
}
int f(void);
void f3(void) {
int r;
if ((r = f()) != 0) { int y = r; printf("the error is: %d\n", y);
}
}
void f4(int k) {
k = 1;
if (k)
f1();
k = 2; }
void f5(void) {
int x = 4; int *p = &x; }
int f6(void) {
int x = 4;
++x; return 1;
}
int f7(int *p) {
p = 0; return 1;
}
int f7b(int *p) {
p = (0); return 1;
}
int f7c(int *p) {
p = (void *)0; return 1;
}
int f7d(int *p) {
p = (void *)(0); return 1;
}
int f8(int *p) {
extern int *baz(void);
if ((p = baz())) return 1;
return 0;
}
int f9(void) {
int x = 4;
x = x + 10; return 1;
}
int f10(void) {
int x = 4;
x = 10 + x; return 1;
}
int f11(void) {
int x = 4;
return x++; }
int f11b(void) {
int x = 4;
return ((((++x)))); }
int f12a(int y) {
int x = y; return 1;
}
int f12b(int y) {
int x __attribute__((unused)) = y; return 1;
}
int f12c(int y) {
int x = y; x = 1;
return x;
}
int f13(void) {
int a = 1;
int b, c = b = a + a;
if (b > 0)
return (0);
return (a + b + c);
}
int f14(int count) {
int index, nextLineIndex;
for (index = 0; index < count; index = nextLineIndex + 1) {
nextLineIndex = index + 1; continue;
}
return index;
}
void f15(unsigned x, unsigned y) {
int count = x * y; int z[count]; }
int f16(int x) {
x = x * 2;
x = sizeof(int[x = (x || x + 1) * 2]) ? 5 : 8;
return x;
}
void f17(void) {
int x = 1;
x = x;
}
int f18(void) {
int x = 0; if (1)
x = 10; while (1)
x = 10; do
x = 10; while (1);
return (x = 10); }
int f18_a(void) {
int x = 0; return (x = 10); }
void f18_b(void) {
int x = 0; if (1)
x = 10; }
void f18_c(void) {
int x = 0;
while (1)
x = 10; }
void f18_d(void) {
int x = 0; do
x = 10; while (1);
}
extern const int MyConstant;
int f19(void) {
int x = MyConstant; x = 1;
return x;
}
int f19b(void) { const int MyConstant = 0;
int x = MyConstant; x = 1;
return x;
}
void f20(void) {
int x = 1; #pragma unused(x)
}
void halt(void) __attribute__((noreturn));
int f21(void) {
int x = 4;
x = x + 1; if (1) {
halt();
(void)x;
}
return 1;
}
int j;
void f22(void) {
int x = 4;
int y1 = 4;
int y2 = 4;
int y3 = 4;
int y4 = 4;
int y5 = 4;
int y6 = 4;
int y7 = 4;
int y8 = 4;
int y9 = 4;
int y10 = 4;
int y11 = 4;
int y12 = 4;
int y13 = 4;
int y14 = 4;
int y15 = 4;
int y16 = 4;
int y17 = 4;
int y18 = 4;
int y19 = 4;
int y20 = 4;
x = x + 1; ++y1;
++y2;
++y3;
++y4;
++y5;
++y6;
++y7;
++y8;
++y9;
++y10;
++y11;
++y12;
++y13;
++y14;
++y15;
++y16;
++y17;
++y18;
++y19;
++y20;
switch (j) {
case 1:
if (0)
(void)x;
if (1) {
(void)y1;
return;
}
(void)x;
break;
case 2:
if (0)
(void)x;
else {
(void)y2;
return;
}
(void)x;
break;
case 3:
if (1) {
(void)y3;
return;
} else
(void)x;
(void)x;
break;
case 4:
0 ?: ((void)y4, ({ return; }));
(void)x;
break;
case 5:
1 ?: (void)x;
0 ? (void)x : ((void)y5, ({ return; }));
(void)x;
break;
case 6:
1 ? ((void)y6, ({ return; })) : (void)x;
(void)x;
break;
case 7:
(void)(0 && x);
(void)y7;
(void)(0 || (y8, ({ return; }), 1));
(void)x;
break;
case 8:
(void)(1 && (y9, ({ return; }), 1));
(void)x;
break;
case 9:
(void)(1 || x);
(void)y10;
break;
case 10:
while (0) {
(void)x;
}
(void)y11;
break;
case 11:
while (1) {
(void)y12;
}
(void)x;
break;
case 12:
do {
(void)y13;
} while (0);
(void)y14;
break;
case 13:
do {
(void)y15;
} while (1);
(void)x;
break;
case 14:
for (;;) {
(void)y16;
}
(void)x;
break;
case 15:
for (; 1;) {
(void)y17;
}
(void)x;
break;
case 16:
for (; 0;) {
(void)x;
}
(void)y18;
break;
case 17:
__builtin_choose_expr(0, (void)x, ((void)y19, ({ return; })));
(void)x;
break;
case 19:
__builtin_choose_expr(1, ((void)y20, ({ return; })), (void)x);
(void)x;
break;
}
}
void f23_aux(const char *s);
void f23(int argc, char **argv) {
int shouldLog = (argc > 1); ^{
if (shouldLog)
f23_aux("I did too use it!\n");
else
f23_aux("I shouldn't log. Wait.. d'oh!\n");
}();
}
void f23_pos(int argc, char **argv) {
int shouldLog = (argc > 1);
^{
f23_aux("I did too use it!\n");
}();
}
void f24_A(int y) {
int x = (y > 2); ^{
int z = x + y;
}();
}
void f24_B(int y) {
__block int x = (y > 2); ^{
x = 5; }();
}
int f24_C(int y) {
__block int x = (y > 2); ^{
x = 5; }();
return x;
}
int f24_D(int y) {
__block int x = (y > 2); ^{
if (y > 4)
x = 5; }();
return x;
}
int f25(int y) {
__block int x = (y > 2);
__block int z = 0;
void (^foo)(void) = ^{
z = x + y;
};
x = 4; foo();
return z;
}
int f25_b(int y) {
__block int x = (y > 2);
__block int z = 0;
x = 4; return z;
}
int f26_nestedblocks(void) {
int z;
z = 1;
__block int y = 0;
^{
int k;
k = 1; ^{
y = z + 1;
}();
}();
return y;
}
void rdar8014335(void) {
for (int i = 0 ; i != 10 ; ({ break; })) {
for (;; ({ ++i; break; }))
;
i = i * 3; }
}
typedef struct { float r; float i; } s_rdar8320674;
typedef struct { s_rdar8320674 x[1]; } s2_rdar8320674;
void rdar8320674(s_rdar8320674 *z, unsigned y, s2_rdar8320674 *st, int m)
{
s_rdar8320674 * z2;
s_rdar8320674 * tw1 = st->x;
s_rdar8320674 t;
z2 = z + m;
do{
; ;
do{ (t).r = (*z2).r*(*tw1).r - (*z2).i*(*tw1).i; (t).i = (*z2).r*(*tw1).i + (*z2).i*(*tw1).r; }while(0);
tw1 += y;
do { (*z2).r=(*z).r-(t).r; (*z2).i=(*z).i-(t).i; }while(0);
do { (*z).r += (t).r; (*z).i += (t).i; }while(0);
++z2;
++z;
}while (--m);
}
void rdar8405222_aux(int i);
void rdar8405222(void) {
const int show = 0;
int i = 0;
if (show)
i = 5; if (show)
rdar8405222_aux(i);
}
int radar11185138_foo(void) {
int x, y;
x = y = 0; return y;
}
int rdar11185138_bar(void) {
int y;
int x = y = 0; x = 2;
y = 2;
return x + y;
}
int *radar11185138_baz(void) {
int *x, *y;
x = y = 0; return y;
}
int getInt(void);
int *getPtr(void);
void testBOComma(void) {
int x0 = (getInt(), 0); int x1 = (getInt(), getInt());
int x2 = (getInt(), getInt(), getInt());
int x3;
x3 = (getInt(), getInt(), 0);
int x4 = (getInt(), (getInt(), 0));
int y;
int x5 = (getInt(), (y = 0));
int x6 = (getInt(), (y = getInt()));
int x7 = 0, x8 = getInt();
int x9 = getInt(), x10 = 0;
int m = getInt(), mm, mmm;
int n, nn = getInt();
int *p;
p = (getPtr(), (int *)0); }
void testVolatile(void) {
volatile int v;
v = 0; }
struct Foo {
int x;
int y;
};
struct Foo rdar34122265_getFoo(void);
int rdar34122265_test(int input) {
struct Foo foo = {0, 0};
if (input > 0) {
foo = rdar34122265_getFoo();
} else {
return 0;
}
return foo.x + foo.y;
}
void rdar34122265_test_cast(void) {
struct Foo foo = {0, 0};
(void)foo;
}
struct Bar {
struct Foo x, y;
};
struct Bar rdar34122265_getBar(void);
int rdar34122265_test_nested(int input) {
struct Bar bar = {{0, 0}, {0, 0}};
if (input > 0) {
bar = rdar34122265_getBar();
} else {
return 0;
}
return bar.x.x + bar.y.y;
}