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.
10 { // { dg-bogus "non-virtual destructor" }
18 { // { dg-bogus "non-virtual destructor" }
26 { // { dg-warning "non-virtual destructor" }
31 { // { dg-warning "non-virtual destructor" }
39 { // { dg-warning "non-virtual destructor" }
48 { // { dg-warning "non-virtual destructor" }