summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.other/cleanup2.C
blob: 976b86411889f2849d05ce45aebc3ef86ea99846 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// { dg-do run  }
// { dg-options "-O -fno-exceptions -w" }
// Origin: Bryan Scattergood <bryan@fsel.com>

extern "C" void abort();

class A
{
public:
  A();
  ~A();
  int foo();
};

A::A() {}
A::~A() { abort (); }
int A::foo() {}

extern int f()
{
  return 0;
}

int main()
{
  return ((f() != 0) ? A().foo() : 0);
}