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] - Rev 749

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

// { dg-do compile }
#include <string>
typedef struct _ts { } PyThreadState;
PyThreadState * Py_NewInterpreter(void);
void Py_EndInterpreter(PyThreadState *);
class ApplicationError {
public:
    ApplicationError(std::string errormsg) : errormsg(errormsg)  { }
    std::string errormsg;
};
void run()
{
    PyThreadState *py_state=__null;
    try {
        if (!(py_state=Py_NewInterpreter()))
            throw ApplicationError("error");
    }
    catch(ApplicationError e) {
        Py_EndInterpreter(py_state);
    }
}

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

powered by: WebSVN 2.1.0

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