aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/linear/call-complex-pointer.c
blob: 2be35c5bef15d5616f884b98e8638f6b17602d14 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
int foo(int p, int (*f0)(int), int (*f1)(int), int arg)
{
	return (p ? f0 : f1)(arg);
}

/*
 * check-name: call-complex-pointer
 * check-command: test-linearize -m64 -Wno-decl $file
 * check-assert: sizeof(void *) == 8
 *
 * check-output-start
foo:
.L0:
	<entry-point>
	cbr         %arg1, .L2, .L3

.L2:
	phisrc.64   %phi1 <- %arg2
	br          .L4

.L3:
	ptrcast.64  %r6 <- (64) %arg3
	phisrc.64   %phi2 <- %r6
	br          .L4

.L4:
	phi.64      %r7 <- %phi1, %phi2
	call.32     %r8 <- %r7, %arg4
	ret.32      %r8


 * check-output-end
 */