summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/lto/20081109_0.C
blob: 93cfc67fff2555962a1b1d48d56da5f2093f002a (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
28
extern "C" { void abort (void);}
int foo (int);

class A
{
  int x;

public:
  A() { x = 2304; }
  ~A() { if (x != 2305) abort (); }
  void inc () { x++; }
};


int main()
{
  A x;
  x.inc();
  try
    {
      foo (0);
      abort ();	// Should not execute
    }
  catch (int e)
    {
      return 0;
    }
}