repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
PR c++/80290
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
overload
/
virtual2.C
blob
c93ba9e298897e41c3b8c323c76c50cff4d24e1a
1
// PR c++/52746
2
// { dg-do run }
3
4
extern "C" int printf(const char*,...);
5
extern "C" void abort();
6
bool db;
7
8
struct A
9
{
10
virtual ~A() {}
11
};
12
13
struct B : public A
14
{
15
virtual ~B() { db = true; }
16
};
17
18
template<int> void test()
19
{
20
B * b = new B;
21
A * a = b;
22
a->~A();
23
::operator delete(b);
24
}
25
26
int main()
27
{
28
test<0>();
29
if (!db)
30
abort();
31
}