gcc/testsuite/g++.dg/tree-prof/pr51719.C
raw| 1 | // PR tree-optimization/51719 |
| 2 | // Explicit { dg-require-effective-target exceptions_enabled } so that dependent tests don't turn UNRESOLVED for '-fno-exceptions'. |
| 3 | // { dg-options "-O -fpartial-inlining" } |
| 4 | |
| 5 | int |
| 6 | bar (void) |
| 7 | { |
| 8 | throw 1; |
| 9 | } |
| 10 | |
| 11 | int __attribute__ ((noinline, noclone)) |
| 12 | foo (int (*f) (void)) |
| 13 | { |
| 14 | try |
| 15 | { |
| 16 | return (*f) (); |
| 17 | } |
| 18 | catch (...) |
| 19 | { |
| 20 | } |
| 21 | return 0; |
| 22 | } |
| 23 | |
| 24 | int |
| 25 | main () |
| 26 | { |
| 27 | return foo (bar); |
| 28 | } |