db/fixup_kernel.sh: fix clear_user() handling
[smatch.git] / validation / mem2reg / broken-phi03.c
blobeff1ff8a88af73e27a845813bb654a35200e04e7
1 int foo(int a, int b)
3 int x;
4 int i;
6 switch (a) {
7 case 0: i = 0; break;
8 case 1: i = 1; break;
9 default: i = -1; break;
12 x = 0;
13 if (b)
14 x = i;
15 return x;
19 * check-name: broken-phi03
20 * check-description:
21 * This is an indirect test to check correctness of phi-node placement.
22 * The misplaced phi-node for 'i' (not at the meet point but where 'i'
23 * is used) causes a missed select-conversion at later stage.
25 * check-command: test-linearize -Wno-decl $file
26 * check-output-ignore
27 * check-output-contains: select\\.