OpenCores
URL https://opencores.org/ocsvn/scarts/scarts/trunk

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.oliva/] [delete5.C] - Blame information for rev 12

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 12 jlechner
// { dg-do run  }
2
// Copyright (C) 1999 Free Software Foundation
3
 
4
// by Alexandre Oliva 
5
 
6
// Test whether dtors of vbases are called from dtor of auto array.
7
// Variant of delete2.C, delete3.C and delete4.C.
8
 
9
extern "C" void abort();
10
extern "C" void exit(int);
11
 
12
struct Foo {
13
  ~Foo() {
14
    exit(0);
15
  }
16
};
17
 
18
struct Bar : virtual Foo {
19
};
20
 
21
void foo() {
22
  Bar i[1];
23
}
24
 
25
int main() {
26
  foo();
27
  abort();
28
}
29
 
30
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.