aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/backend/logical-ops.c
blob: ec5b7c6dc458d1802b81382524c13dce20971485 (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
static int and_bool(int x, int y)
{
	return x && y;
}

static unsigned int uand_bool(unsigned int x, unsigned int y)
{
	return x && y;
}

static int or_bool(int x, int y)
{
	return x || y;
}

static unsigned int uor_bool(unsigned int x, unsigned int y)
{
	return x || y;
}

/*
 * check-name: Logical operator code generation
 * check-command: sparsec -c $file -o tmp.o
 */