1 // { dg-do run { xfail rs6000-*-* powerpc-*-eabi m68k-*-coff mn10300-*-* v850-*-* sh-*-* sh64-*-* h8*-*-* xtensa-*-* m32r*-*-* } }
2 // Test that variadic function calls using thunks work right.
3 // Note that this will break on any target that uses the generic thunk
4 // support, because it doesn't support variadic functions.
11 A (void* q): p (q) { }
12 A (const A& a): p (a.p) { }
17 virtual void BaseFunc();
22 virtual A MixinFunc(int arg, ...) = 0;
25 class CExample : public CBase, public MMixin {
27 A MixinFunc(int arg, ...);
30 void CBase::BaseFunc()
34 A CExample::MixinFunc(int arg, ...)
39 if (arg != 1 || va_arg (ap, int) != 2 || va_arg (ap, int) != 3
40 || va_arg (ap, int) != 4 || va_arg (ap, int) != 5
41 || va_arg (ap, int) != 6 || va_arg (ap, int) != 7
42 || va_arg (ap, int) != 8 || va_arg (ap, int) != 9)
47 void* test(MMixin& anExample)
49 return anExample.MixinFunc(1,2,3,4,5,6,7,8,9).p;