summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/torture/pr43801.C
blob: 3b52d4abcc63f640dcdc21a55f6042715b5667d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// PR tree-optimization/43801
// { dg-do compile }
// { dg-options "-fipa-cp -fipa-cp-clone" }

struct A
{
  virtual void f (int);
};
struct B : virtual A
{
  virtual void f (int i) { if (i) A::f(0); }
};
struct C : virtual B
{
  virtual void f (int) { B::f(0); }
};

void
foo ()
{
  C ();
}