// { dg-do assemble } struct S1 { ~S1(); // { dg-error "" } candidate }; S1::~S1() const // { dg-error "" } prototype does not match { } struct S2 { ~S2() volatile; // { dg-error "" } destructors may not be volatile }; template struct S3 { ~S3(); // { dg-error "" } candidate }; template S3::~S3() volatile // { dg-error "" } prototype does not match { } template struct S4 { ~S4() const; // { dg-error "" } destructors may not be const };