aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/discarded-label-statement.c
blob: b4e58ac64e1d2e3be9eaf0db3c3c0f66bb38754f (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
/*
 * Verify that the statement following an unused label
 * is not discarded with the label.
 */

static int bad(int a, int b)
{
	int r = 0;

start:
	r += a;
	r += b;

	return r;
}

/*
 * check-name: discarded-label-statement
 * check-command: test-linearize $file
 *
 * check-output-ignore
 * check-output-contains: add
 * check-output-contains: %arg1
 */