expand: drop stack adjustments after barrier [PR118006]
[official-gcc.git] / gcc / testsuite / g++.dg / torture / pr33735.C
blob30522f99cc237ac146a2d717b9e13fb5e5cff607
1 // { dg-do compile }
2 // { dg-skip-if "requires hosted libstdc++ for string" { ! hostedlib } }
3 #include <string>
4 typedef struct _ts { } PyThreadState;
5 PyThreadState * Py_NewInterpreter(void);
6 void Py_EndInterpreter(PyThreadState *);
7 class ApplicationError {
8 public:
9     ApplicationError(std::string errormsg) : errormsg(errormsg)  { }
10     std::string errormsg;
12 void run()
14     PyThreadState *py_state=__null;
15     try {
16         if (!(py_state=Py_NewInterpreter()))
17             throw ApplicationError("error");
18     }
19     catch(ApplicationError e) {
20         Py_EndInterpreter(py_state);
21     }