1 /* { dg-do compile } */
2 /* { dg-additional-options "-Wno-pedantic -Wno-long-long -m64" } */
3 
4 /* K+R returns.  as for ANSI .  */
5 
6 /* { dg-final { scan-assembler-times ".extern .func dcl_rv;" 1 } } */
7 void dcl_rv ();
8 
9 /* { dg-final { scan-assembler-times ".extern .func \\(.param.u32 %\[_a-z\]*\\) dcl_rc;" 1 } } */
10 char dcl_rc ();
11 
12 /* { dg-final { scan-assembler-times ".extern .func \\(.param.u32 %\[_a-z\]*\\) dcl_rs;" 1 } } */
13 short dcl_rs ();
14 
15 /* { dg-final { scan-assembler-times ".extern .func \\(.param.u32 %\[_a-z\]*\\) dcl_ri;" 1 } } */
16 int dcl_ri ();
17 
18 /* { dg-final { scan-assembler-times ".extern .func \\(.param.u64 %\[_a-z\]*\\) dcl_rll;" 1 } } */
19 long long dcl_rll ();
20 
21 /* { dg-final { scan-assembler-times ".extern .func \\(.param.f32 %\[_a-z\]*\\) dcl_rf;" 1 } } */
22 float dcl_rf ();
23 
24 /* { dg-final { scan-assembler-times ".extern .func \\(.param.f64 %\[_a-z\]*\\) dcl_rd;" 1 } } */
25 double dcl_rd ();
26 
27 /* { dg-final { scan-assembler-times ".extern .func \\(.param.u64 %\[_a-z\]*\\) dcl_rp;" 1 } } */
28 void *dcl_rp ();
29 
test_1()30 void test_1 ()
31 {
32   dcl_rv ();
33   dcl_rc ();
34   dcl_rs ();
35   dcl_ri ();
36   dcl_rll ();
37   dcl_rf ();
38   dcl_rd ();
39   dcl_rp ();
40 }
41 
42 /* { dg-final { scan-assembler-times ".visible .func dfn_rv(?:;|\[\r\n\]+\{)" 2 } } */
dfn_rv()43 void dfn_rv ()
44 {
45   return;
46 }
47 
48 /* { dg-final { scan-assembler-times ".visible .func \\(.param.u32 %\[_a-z0-9\]*\\) dfn_rc(?:;|\[\r\n\]+\{)" 2 } } */
dfn_rc()49 char dfn_rc ()
50 {
51   return 1;
52 }
53 
54 /* { dg-final { scan-assembler-times ".visible .func \\(.param.u32 %\[_a-z0-0\]*\\) dfn_rs(?:;|\[\r\n\]+\{)" 2 } } */
dfn_rs()55 short dfn_rs ()
56 {
57   return 2;
58 }
59 
60 /* { dg-final { scan-assembler-times ".visible .func \\(.param.u32 %\[_a-z0-9\]*\\) dfn_ri(?:;|\[\r\n\]+\{)" 2 } } */
dfn_ri()61 int dfn_ri ()
62 {
63   return 3;
64 }
65 
66 /* { dg-final { scan-assembler-times ".visible .func \\(.param.u64 %\[_a-z0-9\]*\\) dfn_rll(?:;|\[\r\n\]+\{)" 2 } } */
dfn_rll()67 long long dfn_rll ()
68 {
69   return 4;
70 }
71 
72 /* { dg-final { scan-assembler-times ".visible .func \\(.param.f32 %\[_a-z0-9\]*\\) dfn_rf(?:;|\[\r\n\]+\{)" 2 } } */
dfn_rf()73 float dfn_rf ()
74 {
75   return 5;
76 }
77 
78 /* { dg-final { scan-assembler-times ".visible .func \\(.param.f64 %\[_a-z0-9\]*\\) dfn_rd(?:;|\[\r\n\]+\{)" 2 } } */
dfn_rd()79 double dfn_rd ()
80 {
81   return 6;
82 }
83 
84 /* { dg-final { scan-assembler-times ".visible .func \\(.param.u64 %\[_a-z0-9\]*\\) dfn_rp(?:;|\[\r\n\]+\{)" 2 } } */
dfn_rp()85 void *dfn_rp ()
86 {
87   return 0;
88 }
89