OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [torture/] [pr33735.C] - Blame information for rev 774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// { dg-do compile }
2
#include 
3
typedef struct _ts { } PyThreadState;
4
PyThreadState * Py_NewInterpreter(void);
5
void Py_EndInterpreter(PyThreadState *);
6
class ApplicationError {
7
public:
8
    ApplicationError(std::string errormsg) : errormsg(errormsg)  { }
9
    std::string errormsg;
10
};
11
void run()
12
{
13
    PyThreadState *py_state=__null;
14
    try {
15
        if (!(py_state=Py_NewInterpreter()))
16
            throw ApplicationError("error");
17
    }
18
    catch(ApplicationError e) {
19
        Py_EndInterpreter(py_state);
20
    }
21
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.