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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [torture/] [pr43017.c] - Blame information for rev 754

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

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-do run } */
2
/* { dg-options "-fwrapv" } */
3
 
4
signed char foo(unsigned char c2)
5
{
6
  signed char c2_22;
7
 
8
  if (c2 <= 63 || c2 == 127)
9
    goto bb43;
10
  else
11
    goto bb20;
12
 
13
bb20:
14
  if (c2 > 252)
15
    goto bb43;
16
  else
17
    goto bb21;
18
 
19
bb21:
20
  /*...*/;
21
 
22
bb24:
23
  c2_22 = (signed char)c2;
24
  if (c2_22 >= 0)
25
    goto bb25;
26
  else
27
    goto bb26;
28
 
29
bb25:
30
  c2 = (unsigned char)(c2_22 - 64);
31
  goto bb27;
32
 
33
bb26:
34
  c2 = (unsigned char)(c2_22 - 65);
35
 
36
bb27:
37
  if (c2 <= 93)
38
    goto bb28;
39
  else
40
    goto bb29;
41
 
42
bb28:
43
  c2 = c2 + 33;
44
  goto bb30;
45
 
46
bb29:
47
  c2 = (unsigned char)((signed char)c2 - 61);
48
 
49
bb30:
50
  return c2;
51
 
52
bb43:
53
  return -1;
54
}
55
extern void abort (void);
56
int main()
57
{
58
  signed char res[256] = {
59
      -1, -1, -1, -1, -1, -1, -1, -1,
60
      -1, -1, -1, -1, -1, -1, -1, -1,
61
      -1, -1, -1, -1, -1, -1, -1, -1,
62
      -1, -1, -1, -1, -1, -1, -1, -1,
63
      -1, -1, -1, -1, -1, -1, -1, -1,
64
      -1, -1, -1, -1, -1, -1, -1, -1,
65
      -1, -1, -1, -1, -1, -1, -1, -1,
66
      -1, -1, -1, -1, -1, -1, -1, -1,
67
      33, 34, 35, 36, 37, 38, 39, 40,
68
      41, 42, 43, 44, 45, 46, 47, 48,
69
      49, 50, 51, 52, 53, 54, 55, 56,
70
      57, 58, 59, 60, 61, 62, 63, 64,
71
      65, 66, 67, 68, 69, 70, 71, 72,
72
      73, 74, 75, 76, 77, 78, 79, 80,
73
      81, 82, 83, 84, 85, 86, 87, 88,
74
      89, 90, 91, 92, 93, 94, 95, -1,
75
      96, 97, 98, 99, 100, 101, 102, 103,
76
      104, 105, 106, 107, 108, 109, 110, 111,
77
      112, 113, 114, 115, 116, 117, 118, 119,
78
      120, 121, 122, 123, 124, 125, 126, 33,
79
      34, 35, 36, 37, 38, 39, 40, 41,
80
      42, 43, 44, 45, 46, 47, 48, 49,
81
      50, 51, 52, 53, 54, 55, 56, 57,
82
      58, 59, 60, 61, 62, 63, 64, 65,
83
      66, 67, 68, 69, 70, 71, 72, 73,
84
      74, 75, 76, 77, 78, 79, 80, 81,
85
      82, 83, 84, 85, 86, 87, 88, 89,
86
      90, 91, 92, 93, 94, 95, 96, 97,
87
      98, 99, 100, 101, 102, 103, 104, 105,
88
      106, 107, 108, 109, 110, 111, 112, 113,
89
      114, 115, 116, 117, 118, 119, 120, 121,
90
      122, 123, 124, 125, 126, -1, -1, -1
91
  };
92
  unsigned int c;
93
  for (c = 0; c <= 255; ++c)
94
    {
95
      if (foo (c) != res[c])
96
        abort ();
97
    }
98
  return 0;
99
}

powered by: WebSVN 2.1.0

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