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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [torture/] [stackalign/] [nested-5.c] - Blame information for rev 754

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

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

powered by: WebSVN 2.1.0

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