1 // Test that variadic function calls using thunks work right.
2 // Note that this will break on any target that uses the generic thunk
3 // support, because it doesn't support variadic functions.
5 // Special g++ Options: -fvtable-thunks
6 // excess errors test - XFAIL mips*-*-* rs6000-*-* powerpc-*-eabi m68k-*-coff m68k-motorola-sysv m88k-motorola-sysv3
12 A (void* q): p (q) { }
13 A (const A& a): p (a.p) { }
23 virtual A MixinFunc(int arg, ...) = 0;
26 class CExample : public CBase, public MMixin {
28 A MixinFunc(int arg, ...);
31 void CBase::BaseFunc()
35 A CExample::MixinFunc(int arg, ...)
40 if (arg != 1 || va_arg (ap, int) != 2 || va_arg (ap, int) != 3
41 || va_arg (ap, int) != 4 || va_arg (ap, int) != 5
42 || va_arg (ap, int) != 6 || va_arg (ap, int) != 7
43 || va_arg (ap, int) != 8 || va_arg (ap, int) != 9)
48 void* test(MMixin& anExample)
50 return anExample.MixinFunc(1,2,3,4,5,6,7,8,9).p;