3 // { dg-options "-Wnon-virtual-dtor" }
5 // Warn when a class has virtual functions and accessible non-virtual
6 // destructor, in which case it would be possible but unsafe to delete
7 // an instance of a derived class through a pointer to the base class.
9 struct A // { dg-bogus "non-virtual destructor" }
17 struct B // { dg-bogus "non-virtual destructor" }
25 struct C // { dg-warning "non-virtual destructor" }
30 struct D // { dg-warning "non-virtual destructor" }
38 struct F // { dg-warning "non-virtual destructor" }
47 struct G // { dg-warning "non-virtual destructor" }