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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [nestfunc-5.c] - Blame information for rev 688

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 688 jeremybenn
extern void abort (void);
2
extern void exit (int);
3
 
4
#ifndef NO_TRAMPOLINES
5
static void recursive (int n, void (*proc) (void))
6
{
7
  __label__ l1;
8
 
9
  void do_goto (void)
10
  {
11
    goto l1;
12
  }
13
 
14
  if (n == 3)
15
      recursive (n - 1, do_goto);
16
  else if (n > 0)
17
    recursive (n - 1, proc);
18
  else
19
    (*proc) ();
20
  return;
21
 
22
l1:
23
  if (n == 3)
24
    exit (0);
25
  else
26
    abort ();
27
}
28
 
29
int main ()
30
{
31
  recursive (10, abort);
32
  abort ();
33
}
34
#else
35
int main () { return 0; }
36
#endif

powered by: WebSVN 2.1.0

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