summaryrefslogtreecommitdiffstats
path: root/trunk/testsuite/cxx1.C
blob: 9c11a6d89e6a116c91f2e3c5fe52854171b4b22d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include "cxx1.h"
extern "C" void abort (void);

void
check (A *x, B *y)
{
  C d;
  if (x->b () != 21)
    abort ();
  if (y->B::a () != 22)
    abort ();
  if (d.a () != 23)
    abort ();
  if (d.C::b () != 24)
    abort ();
}

int
main ()
{
  A x;
  if (x.a () != 20)
    abort ();
  do_check (check, &x);
  return 0;
}