xref: /illumos-gate/usr/src/tools/smatch/src/validation/mem2reg/cond-expr.c (revision c85f09cc92abd00c84e58ec9f0f5d942906cb713)
1*c85f09ccSJohn Levon int fun(int);
2*c85f09ccSJohn Levon 
foo(int a,int b,int c)3*c85f09ccSJohn Levon int foo(int a, int b, int c)
4*c85f09ccSJohn Levon {
5*c85f09ccSJohn Levon 	return a ? fun(b) : fun(c);
6*c85f09ccSJohn Levon }
7*c85f09ccSJohn Levon 
8*c85f09ccSJohn Levon /*
9*c85f09ccSJohn Levon  * check-name: cond-expr
10*c85f09ccSJohn Levon  * check-command: test-linearize -Wno-decl -fdump-ir=mem2reg $file
11*c85f09ccSJohn Levon  * check-output-ignore
12*c85f09ccSJohn Levon  * check-output-pattern(2): phi\\.
13*c85f09ccSJohn Levon  * check-output-pattern(3): phisrc\\.
14*c85f09ccSJohn Levon  */
15