]>
Commit | Line | Data |
---|---|---|
74cf1395 JM |
1 | /* Copyright (C) 1996 Free Software Foundation, Inc. |
2 | ||
3 | This program is free software; you can redistribute it and/or modify | |
4 | it under the terms of the GNU General Public License as published by | |
5 | the Free Software Foundation; either version 2 of the License, or | |
6 | (at your option) any later version. | |
7 | ||
8 | This program is distributed in the hope that it will be useful, | |
9 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
11 | GNU General Public License for more details. | |
12 | ||
13 | You should have received a copy of the GNU General Public License | |
14 | along with this program; if not, write to the Free Software | |
15 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |
16 | ||
17 | Please email any bugs, comments, and/or additions to this file to: | |
18 | bug-gdb@prep.ai.mit.edu */ | |
19 | ||
20 | struct struct1 { char a;}; | |
21 | struct struct2 { char a, b;}; | |
22 | struct struct3 { char a, b, c; }; | |
23 | struct struct4 { char a, b, c, d; }; | |
24 | struct struct5 { char a, b, c, d, e; }; | |
25 | struct struct6 { char a, b, c, d, e, f; }; | |
26 | struct struct7 { char a, b, c, d, e, f, g; }; | |
27 | struct struct8 { char a, b, c, d, e, f, g, h; }; | |
28 | struct struct9 { char a, b, c, d, e, f, g, h, i; }; | |
29 | struct struct10 { char a, b, c, d, e, f, g, h, i, j; }; | |
30 | struct struct11 { char a, b, c, d, e, f, g, h, i, j, k; }; | |
31 | struct struct12 { char a, b, c, d, e, f, g, h, i, j, k, l; }; | |
32 | struct struct16 { char a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p; }; | |
33 | ||
34 | struct struct1 foo1 = {'1'}, L1; | |
35 | struct struct2 foo2 = { 'a', 'b'}, L2; | |
36 | struct struct3 foo3 = { 'A', 'B', 'C'}, L3; | |
37 | struct struct4 foo4 = {'1', '2', '3', '4'}, L4; | |
38 | struct struct5 foo5 = {'a', 'b', 'c', 'd', 'e'}, L5; | |
39 | struct struct6 foo6 = {'A', 'B', 'C', 'D', 'E', 'F'}, L6; | |
40 | struct struct7 foo7 = {'1', '2', '3', '4', '5', '6', '7'}, L7; | |
41 | struct struct8 foo8 = {'1', '2', '3', '4', '5', '6', '7', '8'}, L8; | |
42 | struct struct9 foo9 = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i'}, L9; | |
43 | struct struct10 foo10 = { | |
44 | 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J'}, L10; | |
45 | struct struct11 foo11 = { | |
46 | '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B'}, L11; | |
47 | struct struct12 foo12 = { | |
48 | 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L'}, L12; | |
49 | struct struct16 foo16 = { | |
50 | 'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p'}, L16; | |
51 | ||
52 | struct struct1 fun1() | |
53 | { | |
54 | return foo1; | |
55 | } | |
56 | struct struct2 fun2() | |
57 | { | |
58 | return foo2; | |
59 | } | |
60 | struct struct3 fun3() | |
61 | { | |
62 | return foo3; | |
63 | } | |
64 | struct struct4 fun4() | |
65 | { | |
66 | return foo4; | |
67 | } | |
68 | struct struct5 fun5() | |
69 | { | |
70 | return foo5; | |
71 | } | |
72 | struct struct6 fun6() | |
73 | { | |
74 | return foo6; | |
75 | } | |
76 | struct struct7 fun7() | |
77 | { | |
78 | return foo7; | |
79 | } | |
80 | struct struct8 fun8() | |
81 | { | |
82 | return foo8; | |
83 | } | |
84 | struct struct9 fun9() | |
85 | { | |
86 | return foo9; | |
87 | } | |
88 | struct struct10 fun10() | |
89 | { | |
90 | return foo10; | |
91 | } | |
92 | struct struct11 fun11() | |
93 | { | |
94 | return foo11; | |
95 | } | |
96 | struct struct12 fun12() | |
97 | { | |
98 | return foo12; | |
99 | } | |
100 | struct struct16 fun16() | |
101 | { | |
102 | return foo16; | |
103 | } | |
104 | ||
105 | void Fun1(foo1) | |
106 | struct struct1 foo1; | |
107 | { | |
108 | L1 = foo1; | |
109 | } | |
110 | void Fun2(foo2) | |
111 | struct struct2 foo2; | |
112 | { | |
113 | L2 = foo2; | |
114 | } | |
115 | void Fun3(foo3) | |
116 | struct struct3 foo3; | |
117 | { | |
118 | L3 = foo3; | |
119 | } | |
120 | void Fun4(foo4) | |
121 | struct struct4 foo4; | |
122 | { | |
123 | L4 = foo4; | |
124 | } | |
125 | void Fun5(foo5) | |
126 | struct struct5 foo5; | |
127 | { | |
128 | L5 = foo5; | |
129 | } | |
130 | void Fun6(foo6) | |
131 | struct struct6 foo6; | |
132 | { | |
133 | L6 = foo6; | |
134 | } | |
135 | void Fun7(foo7) | |
136 | struct struct7 foo7; | |
137 | { | |
138 | L7 = foo7; | |
139 | } | |
140 | void Fun8(foo8) | |
141 | struct struct8 foo8; | |
142 | { | |
143 | L8 = foo8; | |
144 | } | |
145 | void Fun9(foo9) | |
146 | struct struct9 foo9; | |
147 | { | |
148 | L9 = foo9; | |
149 | } | |
150 | void Fun10(foo10) | |
151 | struct struct10 foo10; | |
152 | { | |
153 | L10 = foo10; | |
154 | } | |
155 | void Fun11(foo11) | |
156 | struct struct11 foo11; | |
157 | { | |
158 | L11 = foo11; | |
159 | } | |
160 | void Fun12(foo12) | |
161 | struct struct12 foo12; | |
162 | { | |
163 | L12 = foo12; | |
164 | } | |
165 | void Fun16(foo16) | |
166 | struct struct16 foo16; | |
167 | { | |
168 | L16 = foo16; | |
169 | } | |
170 | ||
171 | int main() | |
172 | { | |
173 | #ifdef usestubs | |
174 | set_debug_traps(); | |
175 | breakpoint(); | |
176 | #endif | |
177 | ||
178 | /* TEST C FUNCTIONS */ | |
179 | L1 = fun1(); | |
180 | L2 = fun2(); | |
181 | L3 = fun3(); | |
182 | L4 = fun4(); | |
183 | L5 = fun5(); | |
184 | L6 = fun6(); | |
185 | L7 = fun7(); | |
186 | L8 = fun8(); | |
187 | L9 = fun9(); | |
188 | L10 = fun10(); | |
189 | L11 = fun11(); | |
190 | L12 = fun12(); | |
191 | L16 = fun16(); | |
192 | ||
193 | foo1.a = foo2.a = foo3.a = foo4.a = foo5.a = foo6.a = foo7.a = foo8.a = | |
194 | foo9.a = foo10.a = foo11.a = foo12.a = foo16.a = '$'; | |
195 | ||
196 | Fun1(foo1); | |
197 | Fun2(foo2); | |
198 | Fun3(foo3); | |
199 | Fun4(foo4); | |
200 | Fun5(foo5); | |
201 | Fun6(foo6); | |
202 | Fun7(foo7); | |
203 | Fun8(foo8); | |
204 | Fun9(foo9); | |
205 | Fun10(foo10); | |
206 | Fun11(foo11); | |
207 | Fun12(foo12); | |
208 | Fun16(foo16); | |
209 | ||
210 | return 0; | |
211 | } |