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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [debug/] [dwarf2/] [pr37616.c] - Rev 298

Compare with Previous | Blame | View Log

/* PR debug/37616 */
/* Test that one can put breakpoints onto continue, exitlab and break
   and actually see program reaching those breakpoints.  */
/* { dg-do compile } */
/* { dg-options "-O0 -gdwarf-2 -dA" } */
 
extern void abort (void);
 
int
foo (int parm)
{
  int varj, varm;
 
  for (varj = 0; varj < 10; varj++)
    {
      if (varj == 5)
	continue;
      if (varj == 7 && !parm)
	goto exitlab;
      if (varj == 9)
	break;
      varm = varj;
    }
 
exitlab:
  return varm;
}
 
int
main (void)
{
  if (foo (0) != 6)
    abort ();
  if (foo (1) != 8)
    abort ();
  return 0;
}
 
/* { dg-final { scan-assembler "pr37616.c:17" } } */
/* { dg-final { scan-assembler "pr37616.c:19" } } */
/* { dg-final { scan-assembler "pr37616.c:21" } } */
 

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.