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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [pr35800.c] - Blame information for rev 308

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

Line No. Rev Author Line
1 297 jeremybenn
extern void abort (void);
2
 
3
int stab_xcoff_builtin_type (int typenum)
4
{
5
  const char *name;
6
  if (typenum >= 0 || typenum < -34)
7
    {
8
      return 0;
9
    }
10
  switch (-typenum)
11
    {
12
    case 1:
13
      name = "int";
14
      break;
15
    case 2:
16
      name = "char";
17
    case 3:
18
      name = "short";
19
      break;
20
    case 4:
21
      name = "long";
22
    case 5:
23
      name = "unsigned char";
24
    case 6:
25
      name = "signed char";
26
    case 7:
27
      name = "unsigned short";
28
    case 8:
29
      name = "unsigned int";
30
    case 9:
31
      name = "unsigned";
32
    case 10:
33
      name = "unsigned long";
34
    case 11:
35
      name = "void";
36
    case 12:
37
      name = "float";
38
    case 13:
39
      name = "double";
40
    case 14:
41
      name = "long double";
42
    case 15:
43
      name = "integer";
44
    case 16:
45
      name = "boolean";
46
    case 17:
47
      name = "short real";
48
    case 18:
49
      name = "real";
50
    case 19:
51
      name = "stringptr";
52
    case 20:
53
      name = "character";
54
    case 21:
55
      name = "logical*1";
56
    case 22:
57
      name = "logical*2";
58
    case 23:
59
      name = "logical*4";
60
    case 24:
61
      name = "logical";
62
    case 25:
63
      name = "complex";
64
    case 26:
65
      name = "double complex";
66
    case 27:
67
      name = "integer*1";
68
    case 28:
69
      name = "integer*2";
70
    case 29:
71
      name = "integer*4";
72
    case 30:
73
      name = "wchar";
74
    case 31:
75
      name = "long long";
76
    case 32:
77
      name = "unsigned long long";
78
    case 33:
79
      name = "logical*8";
80
    case 34:
81
      name = "integer*8";
82
    }
83
  return name[0];
84
}
85
 
86
int main()
87
{
88
  int i;
89
  if (stab_xcoff_builtin_type(0) != 0)
90
    abort ();
91
  if (stab_xcoff_builtin_type(-1) != 'i')
92
    abort ();
93
  if (stab_xcoff_builtin_type(-2) != 's')
94
    abort ();
95
  if (stab_xcoff_builtin_type(-3) != 's')
96
    abort ();
97
  for (i = -4; i >= -34; --i)
98
    if (stab_xcoff_builtin_type(i) != 'i')
99
      abort ();
100
  if (stab_xcoff_builtin_type(-35) != 0)
101
    abort ();
102
  return 0;
103
}

powered by: WebSVN 2.1.0

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