gcc/testsuite/g++.dg/eh/omit-frame-pointer.C
raw| 1 | // { dg-do run } |
| 2 | // { dg-options -fomit-frame-pointer } |
| 3 | // { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } } |
| 4 | |
| 5 | #include <iostream> |
| 6 | |
| 7 | class Bug |
| 8 | { |
| 9 | }; |
| 10 | |
| 11 | int throw_bug() |
| 12 | { |
| 13 | throw Bug(); |
| 14 | |
| 15 | return 0; |
| 16 | } |
| 17 | |
| 18 | int main() |
| 19 | { |
| 20 | try { |
| 21 | std::cout << throw_bug(); |
| 22 | } catch (Bug bug) { |
| 23 | }; |
| 24 | |
| 25 | return 0; |
| 26 | } |