aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.jason/delete2.C
blob: 7748e2b9cb51d2838ea73c28defde47a703a0cb6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// PRMS Id: 5003
// Bug: g++ complains about calling the destructor for a const object.
// Build don't link:

struct A {
public:
  ~A();
};

const A foo ();

void bar()
{
  A n;
  n = foo();		// gets bogus error - deleting const
}