Debian Codegraph @

gcc/testsuite/g++.old-deja/g++.other/cleanup2.C

raw
1 // { dg-do run }
2 // { dg-options "-O -fno-exceptions -w" }
3 // Origin: Bryan Scattergood <[email protected]>
4
5 extern "C" void abort();
6
7 class A
8 {
9 public:
10 A();
11 ~A();
12 int foo();
13 };
14
15 A::A() {}
16 A::~A() { abort (); }
17 int A::foo() {}
18
19 extern int f()
20 {
21 return 0;
22 }
23
24 int main()
25 {
26 return ((f() != 0) ? A().foo() : 0);
27 }