aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/goto-label.c
blob: 1196fdef9b261bcaa650d4103c7b1a3bc14577ba (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
void foo(void)
{
	goto a;
a:
a:
	return;
}

void g(void)
{
	goto a;
a:
	return;
}

void bar(void)
{
	goto neverland;
}

/*
 * check-name: goto labels
 *
 * check-error-start
goto-label.c:5:1: error: label 'a' redefined
goto-label.c:18:9: error: label 'neverland' was not declared
 * check-error-end
 */