22348da57d
Unchanged yet, failing on Fedora Rawhide. I'll fix it in the upcoming commit.
32 lines
346 B
C
32 lines
346 B
C
// PR c++/52746
|
|
// { dg-do run }
|
|
|
|
extern "C" int printf(const char*,...);
|
|
extern "C" void abort();
|
|
bool db;
|
|
|
|
struct A
|
|
{
|
|
virtual ~A() {}
|
|
};
|
|
|
|
struct B : public A
|
|
{
|
|
virtual ~B() { db = true; }
|
|
};
|
|
|
|
template<int> void test()
|
|
{
|
|
B * b = new B;
|
|
A * a = b;
|
|
a->~A();
|
|
::operator delete(b);
|
|
}
|
|
|
|
int main()
|
|
{
|
|
test<0>();
|
|
if (!db)
|
|
abort();
|
|
}
|