gcc/testsuite/
[official-gcc.git] / gcc / testsuite / g++.dg / abi / forced.C
blob0e6be28bd4f447207c1ec1308a8644a941629e2c
1 // { dg-do run { target *-*-linux* *-*-gnu* } }
2 // { dg-options "-pthread" }
4 #include <pthread.h>
5 #include <cxxabi.h>
6 extern "C" int printf (const char *, ...);
8 int main()
10   try
11     {
12       pthread_exit (0);
13     }
14   catch (abi::__forced_unwind &)
15     {
16       printf ("caught forced unwind\n");
17       throw;
18     }
19   catch (...)
20     {
21       printf ("caught ...\n");
22       return 1;
23     }