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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [opt/] [eh3.C] - Blame information for rev 774

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

Line No. Rev Author Line
1 693 jeremybenn
// PR target/18841
2
// { dg-do run }
3
// { dg-options "-O2" }
4
 
5
extern "C" void abort ();
6
 
7
int r, i1 = 1, i2 = 2, i3 = 3, i4 = 4, i5 = 5;
8
 
9
struct S
10
{
11
  ~S() { r = i1 + i2 + i3 + i4 + i5; }
12
};
13
 
14
void foo()
15
{
16
  S s;
17
  throw 1;
18
}
19
 
20
void bar()
21
{
22
  try {
23
    foo();
24
  } catch (...) {
25
  }
26
}
27
 
28
int main()
29
{
30
  bar();
31
  if (r != 1 + 2 + 3 + 4 + 5)
32
    abort ();
33
}

powered by: WebSVN 2.1.0

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