1 2 3 4 5 6 7 8
// { dg-do compile } struct A {}; struct B { friend A::~B(); // { dg-error "as member of" } };