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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [opt/] [eh3.C] - Rev 856

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

// PR target/18841
// { dg-do run }
// { dg-options "-O2" }

extern "C" void abort ();

int r, i1 = 1, i2 = 2, i3 = 3, i4 = 4, i5 = 5;

struct S
{
  ~S() { r = i1 + i2 + i3 + i4 + i5; }
};

void foo()
{
  S s;
  throw 1;
}

void bar()
{
  try {
    foo();
  } catch (...) {
  }
}

int main()
{
  bar();
  if (r != 1 + 2 + 3 + 4 + 5)
    abort ();
}

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

powered by: WebSVN 2.1.0

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