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/] [compile/] [20031231-1.c] - Blame information for rev 298

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

Line No. Rev Author Line
1 297 jeremybenn
extern int f1 (int, void *);
2
extern int *f2 (void) __attribute__ ((__const__));
3
extern int f3 (int, void *);
4
 
5
int
6
test (int x, char *y, int z)
7
{
8
  int b = 0;
9
 
10
  if (x < 1024)
11
    {
12
      y[0] = '\0';
13
 
14
      do
15
        {
16
          switch (f1 (x, y + b))
17
            {
18
            case -1:
19
              if (b == 0)
20
                return -1;
21
              else
22
                return b;
23
 
24
            default:
25
              b++;
26
            }
27
        }
28
      while (y[b - 1] != '\0' && y[b - 1] != '\n' && b < z);
29
    }
30
  else
31
    {
32
      do
33
        {
34
          switch (f3 (x, y + b))
35
            {
36
            case -1:
37
              if ((*f2 ()) == 4)
38
                continue;
39
              if (b == 0)
40
                return -1;
41
              else
42
                return b;
43
 
44
            default:
45
              b++;
46
            }
47
        }
48
      while (y[b - 1] != '\0' && y[b - 1] != '\n' && b < z);
49
    }
50
  return b;
51
}

powered by: WebSVN 2.1.0

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