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

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [g++.dg/] [ext/] [label3.C] - Diff between revs 301 and 384

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

Rev 301 Rev 384
// Bug: we were removing the p = q assignment in dce, and then reinserting
// Bug: we were removing the p = q assignment in dce, and then reinserting
// it *after* the try/catch in out-of-ssa.  Oops.
// it *after* the try/catch in out-of-ssa.  Oops.
// testcase reduced from libjava/interpret.cc.
// testcase reduced from libjava/interpret.cc.
// { dg-do run }
// { dg-do run }
// { dg-options "-O2" }
// { dg-options "-O2" }
extern "C" int printf (const char *, ...);
extern "C" int printf (const char *, ...);
bool b;
bool b;
int main()
int main()
{
{
  __label__ one, two, done;
  __label__ one, two, done;
  void *labs[] = { &&one, &&two, &&done };
  void *labs[] = { &&one, &&two, &&done };
  const void **q = (const void **)labs;
  const void **q = (const void **)labs;
  const void **p = q;
  const void **p = q;
  try
  try
    {
    {
    one:
    one:
      printf ("one!\n");
      printf ("one!\n");
      if (b)
      if (b)
        throw 42;
        throw 42;
      goto **p++;
      goto **p++;
    two:
    two:
      printf ("two!\n");
      printf ("two!\n");
      goto **p++;
      goto **p++;
    done:
    done:
      printf ("done!\n");
      printf ("done!\n");
    }
    }
  catch (int)
  catch (int)
    {
    {
      printf ("caught!\n");
      printf ("caught!\n");
    }
    }
}
}
 
 

powered by: WebSVN 2.1.0

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