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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.old-deja/] [g++.mike/] [eh48.C] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
// { dg-do run { xfail sparc64-*-elf arm-*-pe } }
2
// { dg-options "-fexceptions" }
3
 
4
#include 
5
#include 
6
 
7
using std::uncaught_exception;
8
class A {
9
public:
10
  ~A() {
11
    if (uncaught_exception ())
12
      exit (0);
13
  }
14
};
15
 
16
int main() {
17
  if (uncaught_exception ())
18
    return 1;
19
  try {
20
    throw "";
21
  } catch (...) {
22
    if (uncaught_exception ())
23
      return 1;
24
  }
25
  if (uncaught_exception ())
26
    return 1;
27
  try {
28
    A a;
29
    throw "";
30
  } catch (...) {
31
    return 1;
32
  }
33
  return 1;
34
}

powered by: WebSVN 2.1.0

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