foo(int a,int b)1 int foo(int a, int b)
2 {
3 	int x;
4 	int i;
5 
6 	switch (a) {
7 	case  0: i = 0; break;
8 	case  1: i = 1; break;
9 	default: i = -1; break;
10 	}
11 
12 	x = 0;
13 	if (b)
14 		x = i;
15 	return x;
16 }
17 
18 /*
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.
24  *
25  * check-command: test-linearize -Wno-decl $file
26  * check-output-ignore
27  * check-output-contains: select\\.
28  */
29