1f08c3bdfSopenharmony_ci#define SIZE	2
2f08c3bdfSopenharmony_cistatic int buf[SIZE];
3f08c3bdfSopenharmony_ci
4f08c3bdfSopenharmony_cistatic inline int swt(int i)
5f08c3bdfSopenharmony_ci{
6f08c3bdfSopenharmony_ci	switch (i) {
7f08c3bdfSopenharmony_ci	case 0 ... (SIZE-1):
8f08c3bdfSopenharmony_ci		return buf[i];
9f08c3bdfSopenharmony_ci	default:
10f08c3bdfSopenharmony_ci		return 0;
11f08c3bdfSopenharmony_ci	}
12f08c3bdfSopenharmony_ci}
13f08c3bdfSopenharmony_ci
14f08c3bdfSopenharmony_cistatic int switch_ok(void) { return swt(1); }
15f08c3bdfSopenharmony_cistatic int switch_ko(void) { return swt(2); }
16f08c3bdfSopenharmony_ci
17f08c3bdfSopenharmony_ci
18f08c3bdfSopenharmony_cistatic inline int cbr(int i, int p)
19f08c3bdfSopenharmony_ci{
20f08c3bdfSopenharmony_ci	if (p)
21f08c3bdfSopenharmony_ci		return buf[i];
22f08c3bdfSopenharmony_ci	else
23f08c3bdfSopenharmony_ci		return 0;
24f08c3bdfSopenharmony_ci}
25f08c3bdfSopenharmony_ci
26f08c3bdfSopenharmony_cistatic int branch_ok(int x) { return cbr(1, x != x); }
27f08c3bdfSopenharmony_cistatic int branch_ko(int x) { return cbr(2, x != x); }
28f08c3bdfSopenharmony_ci
29f08c3bdfSopenharmony_ci/*
30f08c3bdfSopenharmony_ci * check-name: bad-check-access0
31f08c3bdfSopenharmony_ci */
32