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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [eh/] [cond4.C] - Blame information for rev 693

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// Runtime version of cond3.C.  We call terminate when the A cleanup throws
2
// because we've already initialized the exception object.
3
// { dg-do run }
4
 
5
#include 
6
#include 
7
 
8
void my_terminate ()
9
{
10
  std::exit (0);
11
}
12
 
13
struct A {
14
  A(int) { }
15
  ~A() { throw 1; };
16
};
17
struct B {
18
  B(A) { }
19
  ~B() { }
20
};
21
bool b;
22
 
23
int main()
24
{
25
  std::set_terminate (my_terminate);
26
  try
27
    {
28
      throw b ? B(1) : B(1);
29
    }
30
  catch (...) { }
31
  return 1;
32
}

powered by: WebSVN 2.1.0

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