summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.brendan/crash15.C
blob: 3c59fa64b43a7c718121152b3facdbe4f4fa8c16 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// { dg-do assemble  }
// GROUPS passed old-abort
#include <iostream>

class A {
 public:
  virtual ~A() {std::cout << "executed ~A()\n";}
};

class B : public A {
 public:
  virtual ~B() {std::cout << "executed ~B()\n";}
};

int
main() {
  std::cout << "starting\n";
  B b;
  b.~A();
  std::cout << "done\n";
}