This should always be signed chars, so use int8_t. This fixes a miscompile when
[llvm/stm8.git] / test / FrontendC++ / varargs.cpp
blobc4de76acc30b0c5edf509c3f88371d5345b67bb3
1 // RUN: %llvmgxx -S %s -o - | FileCheck %s
2 // rdar://7309675
3 // PR4678
5 // test1 should be compmiled to be a varargs function in the IR even
6 // though there is no way to do a va_begin. Otherwise, the optimizer
7 // will warn about 'dropped arguments' at the call site.
9 // CHECK: define i32 @_Z5test1z(...)
10 int test1(...) {
11 return -1;
14 // CHECK: call i32 (...)* @_Z5test1z(i32 0)
15 void test() {
16 test1(0);