summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.other/eh3.C
blob: 4e61892828634df0eb4a6d83fcc63100c1b3f071 (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
29
30
31
32
33
// { dg-do run  }
// { dg-options "-O" }
typedef struct { } e;

char *p;

void _Jv_throw ();

int barf (int len)
{
  char a[len];

  p = a;
  _Jv_throw ();
  return 0;
}

void _Jv_throw ()
{
  e ex;
  throw ex;
}  

int main ()
{
  try  {
    barf (2);
  }
  catch (...) {
  }

  return 0;
}