2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.oliva / delete5.C
blobdaf2b53a79175842068b33a4cdcd3af5a43d9bf0
1 // { dg-do run  }
2 // Copyright (C) 1999 Free Software Foundation
4 // by Alexandre Oliva <oliva@lsd.ic.unicamp.br>
6 // Test whether dtors of vbases are called from dtor of auto array.
7 // Variant of delete2.C, delete3.C and delete4.C.
9 extern "C" void abort();
10 extern "C" void exit(int);
12 struct Foo {
13   ~Foo() {
14     exit(0);
15   }
18 struct Bar : virtual Foo {
21 void foo() {
22   Bar i[1];
25 int main() {
26   foo();
27   abort();