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++.dg/] [eh/] [ia64-2.C] - Diff between revs 301 and 338

Only display areas with differences | Details | Blame | View Log

Rev 301 Rev 338
// PR target/30230
// PR target/30230
// This testcase failed on IA-64, where end of an EH region ended
// This testcase failed on IA-64, where end of an EH region ended
// in the middle of a bundle (with br.call insn in first or second
// in the middle of a bundle (with br.call insn in first or second
// slot of .bbb/.mbb bundles and EH region end right after it).
// slot of .bbb/.mbb bundles and EH region end right after it).
// But br.call returns to the start of the next bundlem so during
// But br.call returns to the start of the next bundlem so during
// unwinding the call was considered to be outside of the EH region
// unwinding the call was considered to be outside of the EH region
// while it should have been inside.
// while it should have been inside.
// { dg-do run }
// { dg-do run }
// { dg-require-weak "" }
// { dg-require-weak "" }
// { dg-options "-O2" }
// { dg-options "-O2" }
struct A {};
struct A {};
struct B { virtual ~B(); };
struct B { virtual ~B(); };
B::~B () {}
B::~B () {}
struct C { void foo (short &, B &); };
struct C { void foo (short &, B &); };
struct D { void *d1; C *d2; virtual void virt (void) {} };
struct D { void *d1; C *d2; virtual void virt (void) {} };
struct E { D *e1; B *e2; };
struct E { D *e1; B *e2; };
struct F { void bar (void *, B &); };
struct F { void bar (void *, B &); };
F *p __attribute__((weak));
F *p __attribute__((weak));
volatile int r;
volatile int r;
void C::foo (short &x, B &)
void C::foo (short &x, B &)
{
{
  if (r)
  if (r)
    throw A ();
    throw A ();
  x = 1;
  x = 1;
}
}
void F::bar (void *, B &)
void F::bar (void *, B &)
{
{
  throw A ();
  throw A ();
}
}
void baz (E &x)
void baz (E &x)
{
{
  short g = 0;
  short g = 0;
  B b = *x.e2;
  B b = *x.e2;
  x.e1->d2->foo (g, b);
  x.e1->d2->foo (g, b);
  if (g)
  if (g)
    p->bar(x.e1->d1, b);
    p->bar(x.e1->d1, b);
}
}
int main ()
int main ()
{
{
  F g;
  F g;
  D s;
  D s;
  E h;
  E h;
  p = &g;
  p = &g;
  h.e1 = &s;
  h.e1 = &s;
  try
  try
    {
    {
      baz (h);
      baz (h);
    }
    }
  catch (A &)
  catch (A &)
    {
    {
    }
    }
  return 0;
  return 0;
}
}
 
 

powered by: WebSVN 2.1.0

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