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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [pr48809.c] - Blame information for rev 717

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

Line No. Rev Author Line
1 688 jeremybenn
/* PR tree-optimization/48809 */
2
 
3
extern void abort (void);
4
 
5
int
6
foo (signed char x)
7
{
8
  int y = 0;
9
  switch (x)
10
    {
11
    case 0: y = 1; break;
12
    case 1: y = 7; break;
13
    case 2: y = 2; break;
14
    case 3: y = 19; break;
15
    case 4: y = 5; break;
16
    case 5: y = 17; break;
17
    case 6: y = 31; break;
18
    case 7: y = 8; break;
19
    case 8: y = 28; break;
20
    case 9: y = 16; break;
21
    case 10: y = 31; break;
22
    case 11: y = 12; break;
23
    case 12: y = 15; break;
24
    case 13: y = 111; break;
25
    case 14: y = 17; break;
26
    case 15: y = 10; break;
27
    case 16: y = 31; break;
28
    case 17: y = 7; break;
29
    case 18: y = 2; break;
30
    case 19: y = 19; break;
31
    case 20: y = 5; break;
32
    case 21: y = 107; break;
33
    case 22: y = 31; break;
34
    case 23: y = 8; break;
35
    case 24: y = 28; break;
36
    case 25: y = 106; break;
37
    case 26: y = 31; break;
38
    case 27: y = 102; break;
39
    case 28: y = 105; break;
40
    case 29: y = 111; break;
41
    case 30: y = 17; break;
42
    case 31: y = 10; break;
43
    case 32: y = 31; break;
44
    case 98: y = 18; break;
45
    case -62: y = 19; break;
46
    }
47
  return y;
48
}
49
 
50
int
51
main ()
52
{
53
  if (foo (98) != 18 || foo (97) != 0 || foo (99) != 0)
54
    abort ();
55
  if (foo (-62) != 19 || foo (-63) != 0 || foo (-61) != 0)
56
    abort ();
57
  if (foo (28) != 105 || foo (27) != 102 || foo (29) != 111)
58
    abort ();
59
  return 0;
60
}

powered by: WebSVN 2.1.0

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