aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/nvptx/abi-struct-arg.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.target/nvptx/abi-struct-arg.c')
-rw-r--r--gcc/testsuite/gcc.target/nvptx/abi-struct-arg.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/nvptx/abi-struct-arg.c b/gcc/testsuite/gcc.target/nvptx/abi-struct-arg.c
index 54ae651..c2cc4de 100644
--- a/gcc/testsuite/gcc.target/nvptx/abi-struct-arg.c
+++ b/gcc/testsuite/gcc.target/nvptx/abi-struct-arg.c
@@ -3,12 +3,16 @@
/* Struct arg. Passed via pointer. */
+typedef struct {} empty; /* See 'gcc/doc/extend.texi', "Empty Structures". */
typedef struct {char a;} one;
typedef struct {short a;} two;
typedef struct {int a;} four;
typedef struct {long long a;} eight;
typedef struct {int a, b[12];} big;
+/* { dg-final { scan-assembler-times ".extern .func dcl_aempty \\(.param.u64 %\[_a-z0-9\]*\\);" 1 } } */
+void dcl_aempty (empty);
+
/* { dg-final { scan-assembler-times ".extern .func dcl_aone \\(.param.u64 %\[_a-z0-9\]*\\);" 1 } } */
void dcl_aone (one);
@@ -28,6 +32,7 @@ void dcl_abig (big);
void test_1 (void)
{
+ dcl_aempty (({empty t; t;}));
dcl_aone (M (one, 1));
dcl_atwo (M (two, 2));
dcl_afour (M (four, 3));
@@ -35,6 +40,11 @@ void test_1 (void)
dcl_abig (M (big, 5));
}
+/* { dg-final { scan-assembler-times ".visible .func dfn_aempty \\(.param.u64 %\[_a-z0-9\]*\\)(?:;|\[\r\n\]+\{)" 2 } } */
+void dfn_aempty (empty empty)
+{
+}
+
/* { dg-final { scan-assembler-times ".visible .func dfn_aone \\(.param.u64 %\[_a-z0-9\]*\\)(?:;|\[\r\n\]+\{)" 2 } } */
void dfn_aone (one one)
{