☰
Debian Codegraph
@
15:15.3.rel1-2
15:15.3.rel1-1
/
/
gcc
/
testsuite
/
g++.old-deja
/
g++.jason
/
delete2.C
☽
☼
gcc/testsuite/g++.old-deja/g++.jason/delete2.C
code
plain
raw
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
12
void bar()
13
{
14
A n;
15
n = foo(); // { dg-bogus "" } deleting const
16
}