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

28 lines
318 B
C

// { 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);
}