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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [eh/] [elide2.C] - Blame information for rev 825

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

Line No. Rev Author Line
1 149 jeremybenn
// PR c++/13944
2
 
3
// Verify that we still call terminate() if we do run the copy constructor,
4
// and it throws.
5
 
6
// { dg-do run }
7
 
8
#include 
9
#include 
10
 
11
struct A
12
{
13
  A() { }
14
  A(const A&) { throw 1; }
15
};
16
 
17
A a;
18
 
19
void
20
good_terminate() { std::exit (0); }
21
 
22
int main()
23
{
24
  std::set_terminate (good_terminate);
25
  try
26
    {
27
      throw a;
28
    }
29
  catch (...)
30
    {
31
      return 2;
32
    }
33
  return 3;
34
}

powered by: WebSVN 2.1.0

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