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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.mike/] [eh25.C] - Blame information for rev 338

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 305 jeremybenn
// { dg-do run { xfail sparc64-*-elf arm-*-pe } }
2
// { dg-options "-fexceptions" }
3
 
4
#include 
5
#include 
6
 
7
void my_terminate() {
8
  exit (0);             // Double faults should call terminate
9
}
10
 
11
struct A {
12
  A() { }
13
  ~A() {
14
    std::set_terminate (my_terminate);
15
    throw 1;            // This throws from EH dtor, should call my_terminate
16
  }
17
};
18
 
19
main() {
20
  try {
21
    try {
22
      throw 1;
23
    } catch (int i) {
24
      A a;              // A hit on this EH dtor went to the wrong place
25
      throw 1;
26
    }
27
  } catch (...) {
28
    return 1;
29
  }
30
  return 1;
31
}

powered by: WebSVN 2.1.0

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