OSDN Git Service

/cp
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.old-deja / g++.other / dtor12.C
1 // { dg-do run  }
2 // Test that we don't complain about calling a destructor on a const object.
3
4 #include <new>
5
6 struct A
7 {
8   ~A() {}
9 };
10
11 const A a = {};
12 int main()
13 {
14   a.~A();
15   a.A::~A();                    // { dg-bogus "" } const violation
16 }