| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-require-effective-target exceptions } */ |
| 3 |
/* { dg-options "-fexceptions -fgimple -fdump-tree-eh-eh" } */ |
| 4 |
|
| 5 |
void __GIMPLE foo() |
| 6 |
{ |
| 7 |
try |
| 8 |
{ |
| 9 |
try |
| 10 |
{ |
| 11 |
extern void might_throw1 (); |
| 12 |
might_throw1 (); |
| 13 |
} |
| 14 |
finally |
| 15 |
{ |
| 16 |
extern void might_throw2 (); |
| 17 |
might_throw2 (); |
| 18 |
} |
| 19 |
else |
| 20 |
{ |
| 21 |
extern void might_throw3 (); |
| 22 |
might_throw3 (); |
| 23 |
} |
| 24 |
} |
| 25 |
finally |
| 26 |
{ |
| 27 |
extern void might_throw4 (); |
| 28 |
might_throw4 (); |
| 29 |
} |
| 30 |
} |
| 31 |
|
| 32 |
/* { dg-final { scan-tree-dump ".LP 1. might_throw1" "eh" } } */ |
| 33 |
/* { dg-final { scan-tree-dump ".LP 2. might_throw2" "eh" } } */ |
| 34 |
/* { dg-final { scan-tree-dump ".LP 2. might_throw3" "eh" } } */ |