aboutsummaryrefslogtreecommitdiff
blob: 6b74555b1695f4e1f110d131ec78392a3d00732d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
int printf(char *c, ...);
void exit(int c);

#undef PRINT_OUTPUTS

static void test_func_args(int x, int y)
{
	if (x == y)
		exit(1);
}

static int binop_s32(int x, int y)
{
	int a;

	a = a + x;
	a = a / y;
	a = a * x;
	a = a - y;

	return a;
}

static void test_binops(void)
{
	int tmp_s32 = binop_s32(987123, 234);

#ifdef PRINT_OUTPUTS
	printf("binop_s32(987123, 234) == %d\n", tmp_s32);
#else
	if (tmp_s32 != -1470599007)
		exit(2);
#endif
}

int main (int argc, char *argv[])
{
	test_func_args(1, 2);
	test_binops();

	return 0;
}