2 // { dg-skip-if "fails with generic thunk support" { rs6000-*-* powerpc-*-eabi v850-*-* sh-*-* sh64-*-* h8*-*-* xtensa*-*-* m32r*-*-* lm32-*-* } { "*" } { "" } }
3 // Test that variadic function calls using thunks work right.
4 // Note that this will break on any target that uses the generic thunk
5 // support, because it doesn't support variadic functions.
12 A (void* q): p (q) { }
13 A (const A& a): p (a.p) { }
18 virtual void BaseFunc();
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;