aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/infinite-loop03.c
blob: ac8a9519d0e1b9414a8fa3eafac16108fbff5e1c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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
 */