OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [eh/] [ia64-2.C] - Blame information for rev 154

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
// PR target/30230
2
// This testcase failed on IA-64, where end of an EH region ended
3
// in the middle of a bundle (with br.call insn in first or second
4
// slot of .bbb/.mbb bundles and EH region end right after it).
5
// But br.call returns to the start of the next bundlem so during
6
// unwinding the call was considered to be outside of the EH region
7
// while it should have been inside.
8
// { dg-options "-O2" }
9
// { dg-do run }
10
 
11
struct A {};
12
struct B { virtual ~B(); };
13
B::~B () {}
14
struct C { void foo (short &, B &); };
15
struct D { void *d1; C *d2; virtual void virt (void) {} };
16
struct E { D *e1; B *e2; };
17
struct F { void bar (void *, B &); };
18
F *p __attribute__((weak));
19
volatile int r;
20
 
21
void C::foo (short &x, B &)
22
{
23
  if (r)
24
    throw A ();
25
  x = 1;
26
}
27
 
28
void F::bar (void *, B &)
29
{
30
  throw A ();
31
}
32
 
33
void baz (E &x)
34
{
35
  short g = 0;
36
  B b = *x.e2;
37
  x.e1->d2->foo (g, b);
38
  if (g)
39
    p->bar(x.e1->d1, b);
40
}
41
 
42
int main ()
43
{
44
  F g;
45
  D s;
46
  E h;
47
  p = &g;
48
  h.e1 = &s;
49
  try
50
    {
51
      baz (h);
52
    }
53
  catch (A &)
54
    {
55
    }
56
  return 0;
57
}

powered by: WebSVN 2.1.0

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