Fix warning with -Wsign-compare -Wsystem-headers
[official-gcc.git] / gcc / testsuite / gcc.target / nvptx / abi-struct-arg.c
blob54ae651dccaa0817fde0693a25f040da1e0365d4
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 } } */
13 void dcl_aone (one);
15 /* { dg-final { scan-assembler-times ".extern .func dcl_atwo \\(.param.u64 %\[_a-z0-9\]*\\);" 1 } } */
16 void dcl_atwo (two);
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 } } */
25 void dcl_abig (big);
27 #define M(T, v) ({T t; t.a = v; t;})
29 void test_1 (void)
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)