aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/opt/devirt4.C
blob: 72f56afcadcc7c55b0db7d1239086f6761096696 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// PR lto/53808
// Devirtualization should not produce an external ref to ~bar.
// { dg-options "-O2" }
// { dg-final { scan-assembler-not "_ZN3barD0Ev" } }

struct foo {
 virtual ~foo();
};
struct bar : public foo {
 virtual void zed();
};
void f() {
 foo *x(new bar);
 delete x;
}