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/] [goto1.C] - Diff between revs 301 and 338

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

Rev 301 Rev 338
extern "C" void abort ();
extern "C" void abort ();
static int count;
static int count;
struct S {
struct S {
  S() { ++count; }
  S() { ++count; }
  ~S() { --count; }
  ~S() { --count; }
};
};
int foo(int p)
int foo(int p)
{
{
  S s1;
  S s1;
  {
  {
    S s2;
    S s2;
    if (p)
    if (p)
      goto L;
      goto L;
    else
    else
      return 1;
      return 1;
  }
  }
  foo (p);
  foo (p);
 L:
 L:
  return 0;
  return 0;
}
}
int main()
int main()
{
{
  foo(0);
  foo(0);
  if (count != 0)
  if (count != 0)
    abort ();
    abort ();
  foo(1);
  foo(1);
  if (count != 0)
  if (count != 0)
    abort ();
    abort ();
  return 0;
  return 0;
}
}
 
 

powered by: WebSVN 2.1.0

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