OSDN Git Service

+ PR c++/51928
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / eh / builtin3.C
1 // Without explicit prototype, we need to assume the builtin can
2 // throw for builtins that at least on one platform can throw.
3 // { dg-do compile }
4 // { dg-options "-fdump-tree-eh" }
5
6 extern void callme (void) throw();
7
8 int
9 bar (int i)
10 {
11   try {
12     __builtin_printf ("foo %d\n", i);
13   } catch (...) {
14     callme();
15   }
16 }
17
18 /* { dg-final { scan-tree-dump-times "resx" 1 "eh" } } */
19 /* { dg-final { cleanup-tree-dump "eh" } } */