aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/tree-prof/lipo/vcall1_2.C
blob: cc33d6a19dd5c6f4007c889d2f577ebdfe821f69 (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
27
28
29
30
31
/* { dg-options "-O2 -fdump-tree-optimized -fdump-ipa-profile" } */

struct A {
  A () {}

  virtual int AA (void)
  { return 0; }

};

struct B : public A {
  B () {}

  virtual int AA (void)
  { return 1; }
};

struct C : public B {
  C () {}

  virtual int AA (void)
  { return 2; }

};

C c;

A* getC(void)
{
  return &c;
}