aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/infinite-loop03.c
blob: 7af877a83e95969f29ac3fa99fa9516501891f41 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
static void foo(int *buf)
{
	int a = 1;
	int *b;
	do {
		if (a)
			b = buf;
		if (a)
			*buf = 0;
	} while (!(a = !a));
}

/*
 * check-name: infinite loop 03
 * check-command: sparse -Wno-decl $file
 * check-timeout:
 */