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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [nestfunc-5.c] - Rev 826

Compare with Previous | Blame | View Log

extern void abort (void);
extern void exit (int);
 
#ifndef NO_TRAMPOLINES
static void recursive (int n, void (*proc) (void))
{
  __label__ l1;
 
  void do_goto (void)
  {
    goto l1;
  }
 
  if (n == 3)
      recursive (n - 1, do_goto);
  else if (n > 0)
    recursive (n - 1, proc);
  else
    (*proc) ();
  return;
 
l1:
  if (n == 3)
    exit (0);
  else
    abort ();
}
 
int main ()
{
  recursive (10, abort);
  abort ();
}
#else
int main () { return 0; }
#endif
 

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.