OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [torture/] [stackalign/] [non-local-goto-3.c] - Blame information for rev 298

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* { dg-do run } */
2
 
3
#ifndef NO_TRAMPOLINES
4
extern void abort (void);
5
 
6
int x(int a, int b)
7
{
8
  __label__ xlab;
9
 
10
  void y(int b)
11
    {
12
       switch (b)
13
        {
14
          case 1: goto xlab;
15
          case 2: goto xlab;
16
        }
17
    }
18
 
19
  a = a + 2;
20
  y (b);
21
 
22
 xlab:
23
  return a;
24
}
25
 
26
int main ()
27
{
28
  int i, j;
29
 
30
  for (j = 1; j <= 2; ++j)
31
    for (i = 1; i <= 2; ++i)
32
      {
33
        int a = x (j, i);
34
        if (a != 2 + j)
35
          abort ();
36
      }
37
 
38
  return 0;
39
}
40
#else
41
int main() { return 0; }
42
#endif

powered by: WebSVN 2.1.0

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