aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/optim/cgoto01.c
blob: 94b2c2c429db5fe3db5e9dc957d9e5627d1540c7 (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
void abort(void) __attribute__((__noreturn__));

int foo(int a)
{
	void *label;

	if (a == a)
		label = &&L1;
	else
		label = &&L2;
	goto *label;
L1:	return 0;
L2:	abort();
}

/*
 * check-name: cgoto01
 * check-command: test-linearize -Wno-decl $file
 *
 * check-output-ignore
 * check-output-excludes: set\\.
 * check-output-excludes: jmp
 * check-output-excludes: call
 */