blob: 22b36f0b3bb4617ef802d2bf19d2c648c9e93f7e (
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
97
98
99
100
101
102
103
|
extern void abort (void);
int stab_xcoff_builtin_type (int typenum)
{
const char *name;
if (typenum >= 0 || typenum < -34)
{
return 0;
}
switch (-typenum)
{
case 1:
name = "int";
break;
case 2:
name = "char";
case 3:
name = "short";
break;
case 4:
name = "long";
case 5:
name = "unsigned char";
case 6:
name = "signed char";
case 7:
name = "unsigned short";
case 8:
name = "unsigned int";
case 9:
name = "unsigned";
case 10:
name = "unsigned long";
case 11:
name = "void";
case 12:
name = "float";
case 13:
name = "double";
case 14:
name = "long double";
case 15:
name = "integer";
case 16:
name = "boolean";
case 17:
name = "short real";
case 18:
name = "real";
case 19:
name = "stringptr";
case 20:
name = "character";
case 21:
name = "logical*1";
case 22:
name = "logical*2";
case 23:
name = "logical*4";
case 24:
name = "logical";
case 25:
name = "complex";
case 26:
name = "double complex";
case 27:
name = "integer*1";
case 28:
name = "integer*2";
case 29:
name = "integer*4";
case 30:
name = "wchar";
case 31:
name = "long long";
case 32:
name = "unsigned long long";
case 33:
name = "logical*8";
case 34:
name = "integer*8";
}
return name[0];
}
int main()
{
int i;
if (stab_xcoff_builtin_type(0) != 0)
abort ();
if (stab_xcoff_builtin_type(-1) != 'i')
abort ();
if (stab_xcoff_builtin_type(-2) != 's')
abort ();
if (stab_xcoff_builtin_type(-3) != 's')
abort ();
for (i = -4; i >= -34; --i)
if (stab_xcoff_builtin_type(i) != 'i')
abort ();
if (stab_xcoff_builtin_type(-35) != 0)
abort ();
return 0;
}
|