1*c85f09ccSJohn Levon static const char messg[] = "def";
2*c85f09ccSJohn Levon 
add(int a,int b)3*c85f09ccSJohn Levon static inline int add(int a, int b)
4*c85f09ccSJohn Levon {
5*c85f09ccSJohn Levon 	return a + b;
6*c85f09ccSJohn Levon }
7*c85f09ccSJohn Levon 
foo(int a,int b)8*c85f09ccSJohn Levon int  foo(int a, int b) { return add(a + b, 1); }
bar(int a,int b)9*c85f09ccSJohn Levon void bar(int a, int b) {        add(a + b, 1); }
10*c85f09ccSJohn Levon 
11*c85f09ccSJohn Levon 
lstrip(const char * str)12*c85f09ccSJohn Levon static inline const char *lstrip(const char *str)
13*c85f09ccSJohn Levon {
14*c85f09ccSJohn Levon 	return str + 1;
15*c85f09ccSJohn Levon }
16*c85f09ccSJohn Levon 
bas(void)17*c85f09ccSJohn Levon const char *bas(void) { return lstrip("abc"); }
qus(void)18*c85f09ccSJohn Levon const char *qus(void) { return lstrip(messg); }
19*c85f09ccSJohn Levon 
20*c85f09ccSJohn Levon /*
21*c85f09ccSJohn Levon  * check-name: call-inlined
22*c85f09ccSJohn Levon  * check-command: test-linearize -Wno-decl -m64 $file
23*c85f09ccSJohn Levon  * check-assert: sizeof(void*) == 8
24*c85f09ccSJohn Levon  *
25*c85f09ccSJohn Levon  * check-output-start
26*c85f09ccSJohn Levon foo:
27*c85f09ccSJohn Levon .L0:
28*c85f09ccSJohn Levon 	<entry-point>
29*c85f09ccSJohn Levon 	add.32      %r3 <- %arg1, %arg2
30*c85f09ccSJohn Levon 	add.32      %r5 <- %r3, $1
31*c85f09ccSJohn Levon 	ret.32      %r5
32*c85f09ccSJohn Levon 
33*c85f09ccSJohn Levon 
34*c85f09ccSJohn Levon bar:
35*c85f09ccSJohn Levon .L3:
36*c85f09ccSJohn Levon 	<entry-point>
37*c85f09ccSJohn Levon 	ret
38*c85f09ccSJohn Levon 
39*c85f09ccSJohn Levon 
40*c85f09ccSJohn Levon bas:
41*c85f09ccSJohn Levon .L6:
42*c85f09ccSJohn Levon 	<entry-point>
43*c85f09ccSJohn Levon 	add.64      %r16 <- "abc", $1
44*c85f09ccSJohn Levon 	ret.64      %r16
45*c85f09ccSJohn Levon 
46*c85f09ccSJohn Levon 
47*c85f09ccSJohn Levon qus:
48*c85f09ccSJohn Levon .L9:
49*c85f09ccSJohn Levon 	<entry-point>
50*c85f09ccSJohn Levon 	add.64      %r21 <- messg, $1
51*c85f09ccSJohn Levon 	ret.64      %r21
52*c85f09ccSJohn Levon 
53*c85f09ccSJohn Levon 
54*c85f09ccSJohn Levon  * check-output-end
55*c85f09ccSJohn Levon  */
56