1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
// { dg-do assemble } // PRMS Id: 5003 // Bug: g++ complains about calling the destructor for a const object. struct A { public: ~A(); }; const A foo (); void bar() { A n; n = foo(); // { dg-bogus "" } deleting const }