| 1 |
// This testcase failed on s390, because cross-jumping merged 2 calls, |
| 2 |
// one with REG_EH_REGION note with no handlers (ie. termination) |
| 3 |
// and one without REG_EH_REGION note. |
| 4 |
// { dg-do run } |
| 5 |
// { dg-options "-O2" } |
| 6 |
// { dg-skip-if "requires hosted libstdc++ for string" { ! hostedlib } } |
| 7 |
|
| 8 |
#include <exception> |
| 9 |
#include <string> |
| 10 |
|
| 11 |
struct E : public std::exception |
| 12 |
{ |
| 13 |
std::string m; |
| 14 |
E () : m ("test") { } |
| 15 |
~E () throw() { } |
| 16 |
}; |
| 17 |
|
| 18 |
struct C : public E { }; |
| 19 |
|
| 20 |
void foo () |
| 21 |
{ |
| 22 |
throw C (); |
| 23 |
} |
| 24 |
|
| 25 |
int main () |
| 26 |
{ |
| 27 |
try |
| 28 |
{ |
| 29 |
foo (); |
| 30 |
} |
| 31 |
catch (...) { } |
| 32 |
} |