aboutsummaryrefslogtreecommitdiff
path: root/test/varargs.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/varargs.c')
-rw-r--r--test/varargs.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/varargs.c b/test/varargs.c
new file mode 100644
index 0000000..0b5a73d
--- /dev/null
+++ b/test/varargs.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);
+}