aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/torture/pr93347.C
blob: 6e3b1af25f155a86c67025dd78a8b2dd16fd43c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// { dg-additional-options "--param early-inlining-insns=3 --param ipa-cp-eval-threshold=100" }


struct A {
  int a;
};
struct B {
  int b;
};
struct C : B, A {};
struct RA {
  virtual A *operator-();
};
struct RC : RA {
  C *operator-() {
    C *x = new C();
    return x;
  }
};
void fop(RC *x) { -static_cast<RA &>(*x); }