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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [960209-1.c] - Blame information for rev 825

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

Line No. Rev Author Line
1 149 jeremybenn
struct a_struct
2
{
3
  unsigned char a_character;
4
};
5
 
6
struct a_struct an_array[5];
7
struct a_struct *a_ptr;
8
int yabba = 1;
9
 
10
int
11
f (a, b)
12
     unsigned char a;
13
     unsigned long b;
14
{
15
  long i, j, p, q, r, s;
16
 
17
  if (b != (unsigned long) 0)
18
    {
19
      if (yabba)
20
        return -1;
21
      s = 4000000 / b;
22
      for (i = 0; i < 11; i++)
23
        {
24
          for (j = 0; j < 256; j++)
25
            {
26
              if (((p - s < 0) ? -s : 0) < (( q - s < 0) ? -s : q))
27
                r = i;
28
            }
29
        }
30
    }
31
 
32
  if (yabba)
33
    return 0;
34
  a_ptr = &an_array[a];
35
  a_ptr->a_character = (unsigned char) r;
36
}
37
 
38
main ()
39
{
40
  if (f (1, 0UL) != 0)
41
    abort ();
42
  exit (0);
43
}

powered by: WebSVN 2.1.0

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