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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [tree-prof/] [pr44777.c] - Blame information for rev 689

Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

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