foo(int p,int (* f0)(int),int (* f1)(int),int arg)1*c85f09ccSJohn Levon int foo(int p, int (*f0)(int), int (*f1)(int), int arg)
2*c85f09ccSJohn Levon {
3*c85f09ccSJohn Levon 	return (p ? f0 : f1)(arg);
4*c85f09ccSJohn Levon }
5*c85f09ccSJohn Levon 
6*c85f09ccSJohn Levon /*
7*c85f09ccSJohn Levon  * check-name: call-complex-pointer
8*c85f09ccSJohn Levon  * check-command: test-linearize -m64 -Wno-decl $file
9*c85f09ccSJohn Levon  * check-assert: sizeof(void *) == 8
10*c85f09ccSJohn Levon  *
11*c85f09ccSJohn Levon  * check-output-start
12*c85f09ccSJohn Levon foo:
13*c85f09ccSJohn Levon .L0:
14*c85f09ccSJohn Levon 	<entry-point>
15*c85f09ccSJohn Levon 	cbr         %arg1, .L2, .L3
16*c85f09ccSJohn Levon 
17*c85f09ccSJohn Levon .L2:
18*c85f09ccSJohn Levon 	phisrc.64   %phi1 <- %arg2
19*c85f09ccSJohn Levon 	br          .L4
20*c85f09ccSJohn Levon 
21*c85f09ccSJohn Levon .L3:
22*c85f09ccSJohn Levon 	ptrcast.64  %r6 <- (64) %arg3
23*c85f09ccSJohn Levon 	phisrc.64   %phi2 <- %r6
24*c85f09ccSJohn Levon 	br          .L4
25*c85f09ccSJohn Levon 
26*c85f09ccSJohn Levon .L4:
27*c85f09ccSJohn Levon 	phi.64      %r7 <- %phi1, %phi2
28*c85f09ccSJohn Levon 	call.32     %r8 <- %r7, %arg4
29*c85f09ccSJohn Levon 	ret.32      %r8
30*c85f09ccSJohn Levon 
31*c85f09ccSJohn Levon 
32*c85f09ccSJohn Levon  * check-output-end
33*c85f09ccSJohn Levon  */
34