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/] [eh2.C] - Rev 816

Compare with Previous | Blame | View Log

// PR 6764
// { dg-do run }
// { dg-options "-O -fomit-frame-pointer" }

extern "C" void abort ();

class test
{
 public:
  test * const me;
  test () : me(this) { }
  ~test () { if (me != this) abort (); }
};

void x1 ()
{
  test w1;
  throw 1;
}

void x2 ()
{
  test w2;
  x1 ();
}

int main (void)
{
  try {
    x2 ();
  } catch (...) {
  }
  return 0;
}

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.