foo(int a,int b)1*c85f09ccSJohn Levonint foo(int a, int b) 2*c85f09ccSJohn Levon { 3*c85f09ccSJohn Levon int x; 4*c85f09ccSJohn Levon int i; 5*c85f09ccSJohn Levon 6*c85f09ccSJohn Levon switch (a) { 7*c85f09ccSJohn Levon case 0: i = 0; break; 8*c85f09ccSJohn Levon case 1: i = 1; break; 9*c85f09ccSJohn Levon default: i = -1; break; 10*c85f09ccSJohn Levon } 11*c85f09ccSJohn Levon 12*c85f09ccSJohn Levon x = 0; 13*c85f09ccSJohn Levon if (b) 14*c85f09ccSJohn Levon x = i; 15*c85f09ccSJohn Levon return x; 16*c85f09ccSJohn Levon } 17*c85f09ccSJohn Levon 18*c85f09ccSJohn Levon /* 19*c85f09ccSJohn Levon * check-name: broken-phi03 20*c85f09ccSJohn Levon * check-description: 21*c85f09ccSJohn Levon * This is an indirect test to check correctness of phi-node placement. 22*c85f09ccSJohn Levon * The misplaced phi-node for 'i' (not at the meet point but where 'i' 23*c85f09ccSJohn Levon * is used) causes a missed select-conversion at later stage. 24*c85f09ccSJohn Levon * 25*c85f09ccSJohn Levon * check-command: test-linearize -Wno-decl $file 26*c85f09ccSJohn Levon * check-output-ignore 27*c85f09ccSJohn Levon * check-output-contains: select\\. 28*c85f09ccSJohn Levon */ 29