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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [g++.dg/] [eh/] [elide2.C] - Blame information for rev 308

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

Line No. Rev Author Line
1 301 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.