summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/torture/pr43257.C
blob: a3e75574adb908d2aa3fe0b86513cba7f9f224df (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
/* { dg-do assemble } */

class A {};
class B {};

static void *func (int n)
{
  void *p;
  if (p == 0) throw ::A ();
}

static void *func (int n, B const &)
{
  try {
      return func (n);
  }
  catch (::A const &) {
  }
  return func (n);
}

void *f1 (int n)
{
  return func (n, B());
}

void *f2 (int n)
{
  return func (n, B());
}