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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [torture/] [stackalign/] [comp-goto-1.c] - Blame information for rev 801

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

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-do run } */
2
 
3
#ifdef STACK_SIZE
4
#define DEPTH ((STACK_SIZE) / 512 + 1)
5
#else
6
#define DEPTH 1000
7
#endif
8
 
9
extern void abort (void);
10
extern void exit (int);
11
 
12
#if ! defined (NO_LABEL_VALUES) && !defined (NO_TRAMPOLINES)
13
int
14
x(a)
15
{
16
  __label__ xlab;
17
  void y(a)
18
    {
19
      void *x = &&llab;
20
      if (a==-1)
21
        goto *x;
22
      if (a==0)
23
        goto xlab;
24
    llab:
25
      y (a-1);
26
    }
27
  y (a);
28
 xlab:;
29
  return a;
30
}
31
#endif
32
 
33
int
34
main ()
35
{
36
#if ! defined (NO_LABEL_VALUES) && !defined (NO_TRAMPOLINES)
37
  if (x (DEPTH) != DEPTH)
38
    abort ();
39
#endif
40
  exit (0);
41
}

powered by: WebSVN 2.1.0

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