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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [torture/] [stackalign/] [non-local-goto-2.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
 
5
int global;
6
 
7
static void foo(void) __attribute__((noinline));
8
 
9
static void foo(void)
10
{
11
  global = 1;
12
}
13
 
14
static void bar(void)
15
{
16
  foo ();
17
  global = 0;
18
}
19
 
20
int execute(int cmd)
21
{
22
  __label__ start;
23
 
24
  void raise(void)
25
  {
26
    goto start;
27
  }
28
 
29
  int last = -1;
30
 
31
  bar ();
32
 
33
  last = 0;
34
 
35
start:
36
 
37
  if (last == 0)
38
    while (1)
39
      {
40
        last = 1;
41
        raise ();
42
      }
43
 
44
  if (last == 0)
45
    return 0;
46
  else
47
    return cmd;
48
}
49
 
50
int main(void)
51
{
52
  if (execute (1) == 0)
53
    abort ();
54
 
55
  return 0;
56
}

powered by: WebSVN 2.1.0

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