aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/ipa/devirt-28.C
blob: 9bfef924d9532e15c1e33ea9ea280e4621e2dc24 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// PR c++/58678
// { dg-options "-O3 -fdump-ipa-devirt -fdevirtualize" }

struct A {
  virtual ~A();
};
struct B : A {
  virtual int m_fn1();
};
void fn1(B* b) {
  delete b;
}

// { dg-final { scan-assembler-not "_ZN1AD2Ev" } }
// { dg-final { scan-assembler-not "_ZN1BD0Ev" } }
// { dg-final { scan-ipa-dump "Target is artificial" "devirt" } }
// { dg-final { cleanup-ipa-dump "devirt" } }