1 /* { dg-do compile } */
2 /* { dg-additional-options "-Wno-pedantic -Wno-long-long -m64" } */
4 /* Struct arg. Passed via pointer. */
6 typedef struct {char a
;} one
;
7 typedef struct {short a
;} two
;
8 typedef struct {int a
;} four
;
9 typedef struct {long long a
;} eight
;
10 typedef struct {int a
, b
[12];} big
;
12 /* { dg-final { scan-assembler-times ".extern .func dcl_aone \\(.param.u64 %\[_a-z0-9\]*\\);" 1 } } */
15 /* { dg-final { scan-assembler-times ".extern .func dcl_atwo \\(.param.u64 %\[_a-z0-9\]*\\);" 1 } } */
18 /* { dg-final { scan-assembler-times ".extern .func dcl_afour \\(.param.u64 %\[_a-z0-9\]*\\);" 1 } } */
19 void dcl_afour (four
);
21 /* { dg-final { scan-assembler-times ".extern .func dcl_aeight \\(.param.u64 %\[_a-z0-9\]*\\);" 1 } } */
22 void dcl_aeight (eight
);
24 /* { dg-final { scan-assembler-times ".extern .func dcl_abig \\(.param.u64 %\[_a-z0-9\]*\\);" 1 } } */
27 #define M(T, v) ({T t; t.a = v; t;})
31 dcl_aone (M (one
, 1));
32 dcl_atwo (M (two
, 2));
33 dcl_afour (M (four
, 3));
34 dcl_aeight (M (eight
, 4));
35 dcl_abig (M (big
, 5));
38 /* { dg-final { scan-assembler-times ".visible .func dfn_aone \\(.param.u64 %\[_a-z0-9\]*\\)(?:;|\[\r\n\]+\{)" 2 } } */
39 void dfn_aone (one one
)
43 /* { dg-final { scan-assembler-times ".visible .func dfn_atwo \\(.param.u64 %\[_a-z0-9\]*\\)(?:;|\[\r\n\]+\{)" 2 } } */
44 void dfn_atwo (two two
)
48 /* { dg-final { scan-assembler-times ".visible .func dfn_afour \\(.param.u64 %\[_a-z0-9\]*\\)(?:;|\[\r\n\]+\{)" 2 } } */
49 void dfn_afour (four four
)
53 /* { dg-final { scan-assembler-times ".visible .func dfn_aeight \\(.param.u64 %\[_a-z0-9\]*\\)(?:;|\[\r\n\]+\{)" 2 } } */
54 void dfn_aeight (eight eight
)
58 /* { dg-final { scan-assembler-times ".visible .func dfn_abig \\(.param.u64 %\[_a-z0-9\]*\\)(?:;|\[\r\n\]+\{)" 2 } } */
59 void dfn_abig (big big
)