aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/linear/non-const-case.c
blob: 5cf55717e5bea0996c180b170abee2e1f4daf836 (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
static int foo(int a)
{
	switch (a) {
	case 0:
		return a;
	case a:
		return 0;
	case (a - a):
		return 1;
	default:
		return a;
	}
}

static int bar(int a)
{
	switch (a) {
	case 0:
		break;
	case a:
		a++;
label:
		return a;
	}

	goto label;
}


/*
 * check-name: non-const-case
 * check-command: test-linearize -Wno-decl $file
 * check-known-to-fail
 *
 * check-error-ignore
 * check-output-ignore
 * check-output-excludes:switch \\.
 */