mirror of
https://github.com/autc04/Retro68.git
synced 2024-11-03 07:07:20 +00:00
19 lines
254 B
C++
19 lines
254 B
C++
|
// { dg-do run }
|
||
|
|
||
|
#include "lib.h"
|
||
|
|
||
|
struct Derived: public Base
|
||
|
{
|
||
|
virtual ~Derived()
|
||
|
{ printf("In Derived destructor\n"); }
|
||
|
};
|
||
|
|
||
|
int main()
|
||
|
{
|
||
|
Derived * d = new Derived;
|
||
|
Destroy(d);
|
||
|
Base * pp = GetPrivate();
|
||
|
delete pp; // Virtual call #2
|
||
|
}
|
||
|
|