summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/unsorted/cc.c
blob: e29bec49d413130e68fc46d2c4e191a291313a12 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
cc8 (a, b)
{
  if (a < 0)
    goto L1;
    if (a == 0)
      goto L2;
 L1:b++;
 L2:b++;
  return b;
}

cc7 (a)
     long long a;
{
  if (a < 0)
    return 1;
  else
    return 0;
}

cc6 (float a, double p)
{
  p = a;
  if (p < 0)
    return p;
  else
    return p + 1;
}

cc5 (p, a)
     char *p;
     char a;
{
  p[2] = a;
  if (a)
    return 0;
  else
    return 1;
}


cc4 (a, b, p)
     int a, b;
     int *p;
{
  a = (int short)b;
  *p = a;
  if ((int) a < 0)
    return 0;
  else
    return 1;
}


cc1 (a, b)
{
  int x = 0;

  if ((int) a < (int) b)
    {
      if ((unsigned) a < (unsigned) b)
	x++;
      x++;
    }

  return x;
}

cc2 (a, b)
{
  int x = 0;

  if ((int) a <= (int) b)
    {
      if ((int) a < (int) b)
	x++;
      x++;
    }

  return x;
}

cc3 (a, b)
{
  int x = 0;

  a += b;
  if ((unsigned) a > 0)
    {
      if (a == 0)
	x++;
      x++;
    }

  return x;
}