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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [920302-1.c] - Blame information for rev 414

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

Line No. Rev Author Line
1 297 jeremybenn
short optab[5];
2
char buf[10];
3
execute (ip)
4
     register short *ip;
5
{
6
#ifndef NO_LABEL_VALUES
7
  register void *base = &&x;
8
  char *bp = buf;
9
  static void *tab[] = {&&x, &&y, &&z};
10
  if (ip == 0)
11
    {
12
      int i;
13
      for (i = 0; i < 3; ++i)
14
        optab[i] = (short)(tab[i] - base);
15
      return;
16
    }
17
x:  *bp++='x';
18
    goto *(base + *ip++);
19
y:  *bp++='y';
20
    goto *(base + *ip++);
21
z:  *bp++='z';
22
    *bp=0;
23
    return;
24
#else
25
    strcpy (buf, "xyxyz");
26
#endif
27
}
28
 
29
short p[5];
30
 
31
main ()
32
{
33
  execute ((short *) 0);
34
  p[0] = optab[1];
35
  p[1] = optab[0];
36
  p[2] = optab[1];
37
  p[3] = optab[2];
38
  execute (&p);
39
  if (strcmp (buf, "xyxyz"))
40
    abort ();
41
  exit (0);
42
}

powered by: WebSVN 2.1.0

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