gcc/testsuite/g++.dg/eh/nested-try.C
raw| 1 | // { dg-do compile } |
| 2 | // Nested try statements shadowing each other was crashing in EH edge redirection. |
| 3 | // PR middle-end/40043 |
| 4 | struct A |
| 5 | { |
| 6 | ~A(); |
| 7 | void foo(); |
| 8 | }; |
| 9 | |
| 10 | void bar() |
| 11 | { |
| 12 | A a; |
| 13 | |
| 14 | try |
| 15 | { |
| 16 | A b; |
| 17 | |
| 18 | try |
| 19 | { |
| 20 | b.foo(); |
| 21 | } |
| 22 | catch (int) {} |
| 23 | } |
| 24 | catch (int) {} |
| 25 | } |