diff options
Diffstat (limited to 'test/varargs+x86_64.c')
-rw-r--r-- | test/varargs+x86_64.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/varargs+x86_64.c b/test/varargs+x86_64.c new file mode 100644 index 0000000..0b5a73d --- /dev/null +++ b/test/varargs+x86_64.c @@ -0,0 +1,12 @@ +void f(int n, ...) { + __builtin_va_list ap; + + __builtin_va_start(ap, n); + while (n) { + __builtin_va_arg(ap, int); + __builtin_va_arg(ap, float); + __builtin_va_arg(ap, char *); + --n; + } + __builtin_va_end(ap); +} |