* auto-profile.c (afdo_annotate_cfg): Use update_max_bb_count.
[official-gcc.git] / gcc / testsuite / g++.dg / inherit / thunk1.C
blob3d3c1fbc067b2aa97f5111d47fafdb8212b794a3
1 // { dg-do run { target arm*-*-* aarch64*-*-* i?86-*-* x86_64-*-* s390*-*-* alpha*-*-* ia64-*-* sparc*-*-* } }
2 // { dg-skip-if "" { arm_thumb1_ok } }
4 #include <stdarg.h>
6 extern "C" void abort ();
8 struct A {
9   virtual void f (int, ...) {}
10   int i;
13 struct B : virtual public A {
16 struct C : public B {
17   C ();
18   virtual void f (int, ...);
21 extern C* cp;
23 C::C () { cp = this; }
25 void C::f (int i, ...) {
26   if (this != cp)
27     abort ();
28   va_list ap;
29   if (i != 3)
30     abort ();
31   va_start (ap, i);
32   if (va_arg (ap, int) != 7)
33     abort ();
34   va_end (ap);
37 C* cp = new C;
39 int main () 
41   cp->f (3, 7);