summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/eh/builtin3.C
blob: b4a067263056a21dfe2862a856a6504903d6b6eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Without explicit prototype, we need to assume the builtin can
// throw for builtins that at least on one platform can throw.
// { dg-do compile }
// { dg-options "-fdump-tree-eh" }

extern void callme (void) throw();

int
bar (int i)
{
  try {
    __builtin_printf ("foo %d\n", i);
  } catch (...) {
    callme();
  }
}

/* { dg-final { scan-tree-dump-times "resx" 1 "eh" } } */