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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [gcov/] [gcov-11.C] - Rev 801

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

/* Check that unexecuted exception processing regions are shown
   distinct from  unexecuted normal regions.  */

/* { dg-options "-fprofile-arcs -ftest-coverage" } */
/* { dg-do run { target native } } */

void Baz (int i)
{
  if (i)
    throw 1;
}

void Boz () throw ()
{
}

int main ()
{
  try
    {
      Baz (0);  /* count (1) */
      Baz (0);  /* count (1) */
    }
  catch (...)
    {
      Boz ();  /* count (=====) */
    }

  try
    {
      Baz (1);  /* count (1) */
      Baz (0);  /* count (#####) */
    }
  catch (...)
    {
      Boz ();  /* count (1) */
    }

  return 0;  /* count (1) */
}

/* { dg-final { run-gcov gcov-11.C } } */

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.