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