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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [libitm/] [testsuite/] [libitm.c++/] [eh-1.C] - Blame information for rev 791

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

Line No. Rev Author Line
1 737 jeremybenn
// { dg-do run }
2
 
3
extern "C" void abort ();
4
 
5
int dothrow;
6
int g;
7
 
8
static void f1()
9
{
10
  g++;
11
  if (dothrow)
12
    throw 1;
13
}
14
 
15
static void f2()
16
{
17
  __transaction_atomic {
18
    f1();
19
  }
20
}
21
 
22
int main()
23
{
24
  dothrow = 0;
25
  f2();
26
 
27
  dothrow = 1;
28
  try {
29
    f2();
30
  } catch (...) {
31
  }
32
 
33
  if (g != 2)
34
    abort ();
35
  return 0;
36
}

powered by: WebSVN 2.1.0

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