aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/linear/call-basic.c
blob: 235b443d2c795104893d41258ee621d04302dedc (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
58
extern int fun(int a);

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

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

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

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

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


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


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


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


 * check-output-end
 */