diff options
Diffstat (limited to 'gcc/testsuite/c-c++-common/strub-apply1.c')
-rw-r--r-- | gcc/testsuite/c-c++-common/strub-apply1.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/c-c++-common/strub-apply1.c b/gcc/testsuite/c-c++-common/strub-apply1.c new file mode 100644 index 0000000..2f462ad --- /dev/null +++ b/gcc/testsuite/c-c++-common/strub-apply1.c @@ -0,0 +1,15 @@ +/* { dg-do compile } */ +/* { dg-options "-fstrub=strict" } */ + +void __attribute__ ((__strub__ ("callable"))) +apply_function (void *args) +{ + __builtin_apply (0, args, 0); +} + +void __attribute__ ((__strub__ ("internal"))) +apply_args (int i, int j, double d) +{ + void *args = __builtin_apply_args (); + apply_function (args); +} |