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/] [930529-1.c] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
dd (x,d) { return x / d; }
2
 
3
main ()
4
{
5
  int i;
6
  for (i = -3; i <= 3; i++)
7
    {
8
      if (dd (i, 1) != i / 1)
9
        abort ();
10
      if (dd (i, 2) != i / 2)
11
        abort ();
12
      if (dd (i, 3) != i / 3)
13
        abort ();
14
      if (dd (i, 4) != i / 4)
15
        abort ();
16
      if (dd (i, 5) != i / 5)
17
        abort ();
18
      if (dd (i, 6) != i / 6)
19
        abort ();
20
      if (dd (i, 7) != i / 7)
21
        abort ();
22
      if (dd (i, 8) != i / 8)
23
        abort ();
24
    }
25
  for (i = ((unsigned) ~0 >> 1) - 3; i <= ((unsigned) ~0 >> 1) + 3; i++)
26
    {
27
      if (dd (i, 1) != i / 1)
28
        abort ();
29
      if (dd (i, 2) != i / 2)
30
        abort ();
31
      if (dd (i, 3) != i / 3)
32
        abort ();
33
      if (dd (i, 4) != i / 4)
34
        abort ();
35
      if (dd (i, 5) != i / 5)
36
        abort ();
37
      if (dd (i, 6) != i / 6)
38
        abort ();
39
      if (dd (i, 7) != i / 7)
40
        abort ();
41
      if (dd (i, 8) != i / 8)
42
        abort ();
43
    }
44
  exit (0);
45
}

powered by: WebSVN 2.1.0

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