1 // RUN: %clang_cc1 %s -ffreestanding
2 // RUN: %clang_cc1 %s -ffreestanding -triple i686-unknown-linux
3 // RUN: %clang_cc1 %s -ffreestanding -triple x86_64-unknown-linux
4 // RUN: %clang_cc1 %s -ffreestanding -triple mips-unknown-linux
5 // RUN: %clang_cc1 %s -ffreestanding -triple mipsel-unknown-linux
6 // RUN: %clang_cc1 %s -ffreestanding -triple armv7-unknown-linux-gnueabi
7 // RUN: %clang_cc1 %s -ffreestanding -triple thumbv7-unknown-linux-gnueabi
11 int int_accumulator
= 0;
12 double double_accumulator
= 0;
14 int test_vprintf(const char *fmt
, va_list ap
) {
17 while (*fmt
!= '\0') {
26 int_accumulator
+= va_arg(ap
, int);
31 double_accumulator
+= va_arg(ap
, double);
46 int test_printf(const char *fmt
, ...) {
49 int result
= test_vprintf(fmt
, ap
);