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
7 #include <exception>
8 #include <string>
9
10 struct E : public std::exception
11 {
12 std::string m;
EE13 E () : m ("test") { }
~EE14 ~E () throw() { }
15 };
16
17 struct C : public E { };
18
foo()19 void foo ()
20 {
21 throw C ();
22 }
23
main()24 int main ()
25 {
26 try
27 {
28 foo ();
29 }
30 catch (...) { }
31 }
32