Files
clang-p2996/clang/test/CodeGen/PowerPC/ppc-sfvarargs.c
Aaron Ballman 1ea584377e A significant number of our tests in C accidentally use functions
without prototypes. This patch converts the function signatures to have
a prototype for the situations where the test is not specific to K&R C
declarations. e.g.,

  void func();

becomes

  void func(void);

This is the ninth batch of tests being updated (there are a
significant number of other tests left to be updated).
2022-02-13 08:03:40 -05:00

18 lines
431 B
C

// RUN: %clang -O0 --target=powerpc-unknown-linux-gnu -EB -msoft-float -S -emit-llvm %s -o - | FileCheck %s
#include <stdarg.h>
void test(char *fmt, ...) {
va_list ap;
va_start(ap, fmt);
va_arg(ap, double);
va_end(ap);
}
void foo(void) {
double a;
test("test",a);
}
// CHECK: %{{[0-9]+}} = add i8 %{{[0-9]+|numUsedRegs}}, 1
// CHECK: %{{[0-9]+}} = and i8 %{{[0-9]+}}, -2
// CHECK: %{{[0-9]+}} = mul i8 %{{[0-9]+}}, 4