aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/linear/call-basic.c
blob: 3822a2674f2788a25b1bf7a35a7b741356ed8ac5 (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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
extern int fun(int a);

void symbol(int a)
{
	fun(a);
}

void pointer0(int a, int (*fun)(int))
{
	fun(a);
}

void pointer1(int a, int (*fun)(int))
{
	(*fun)(a);
}

void builtin(int a)
{
	__builtin_popcount(a);
}

/*
 * check-name: basic function calls
 * check-command: test-linearize -Wno-decl $file
 *
 * check-output-start
symbol:
.L0:
	<entry-point>
	call.32     %r2 <- fun, %arg1
	ret


pointer0:
.L2:
	<entry-point>
	call.32     %r5 <- %arg2, %arg1
	ret


pointer1:
.L4:
	<entry-point>
	call.32     %r8 <- %arg2, %arg1
	ret


builtin:
.L6:
	<entry-point>
	call.32     %r10 <- __builtin_popcount, %arg1
	ret


 * check-output-end
 */