blob: 14a453e042bf69904925884ee86e14b14195e966 (
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
|
/* Test for multiple declarations and composite types. As in bug
13801. Test no problems in debug information generation. */
/* Origin: Joseph Myers <jsm@polyomino.org.uk> */
/* { dg-do compile } */
/* { dg-options "" } */
typedef int IA[];
typedef int A10[10];
/* Test all combinations of: a variable declared at file scope (no
type specifiers, or extern, or static), or just inside a function
(with extern), redeclared in an inner scope (with extern), and
redeclared in an inner scope when the previous declaration is
hidden (with extern, and not if the original declaration was
static). Test three times: incomplete variable types; pointers to
incomplete types; functions returning such pointers.
This test only includes the valid code cases, to test debug info
generation. (Incomplete static at file scope is not permitted by
ISO C, but is accepted by GCC as an extension without
-pedantic.) */
A10 a5;
void
f5 (void)
{
sizeof(a5);
{
extern IA a5;
sizeof(a5);
{
int a5;
{
extern A10 a5;
sizeof(a5);
}
}
sizeof(a5);
}
sizeof(a5);
}
extern A10 a5;
A10 a7;
void
f7 (void)
{
sizeof(a7);
{
extern A10 a7;
sizeof(a7);
{
int a7;
{
extern A10 a7;
sizeof(a7);
}
}
sizeof(a7);
}
sizeof(a7);
}
extern A10 a7;
extern A10 a13;
void
f13 (void)
{
sizeof(a13);
{
extern IA a13;
sizeof(a13);
{
int a13;
{
extern A10 a13;
sizeof(a13);
}
}
sizeof(a13);
}
sizeof(a13);
}
extern A10 a13;
extern A10 a15;
void
f15 (void)
{
sizeof(a15);
{
extern A10 a15;
sizeof(a15);
{
int a15;
{
extern A10 a15;
sizeof(a15);
}
}
sizeof(a15);
}
sizeof(a15);
}
extern A10 a15;
static A10 a18;
void
f18 (void)
{
sizeof(a18);
{
extern IA a18;
sizeof(a18);
}
sizeof(a18);
}
extern A10 a18;
static A10 a19;
void
f19 (void)
{
sizeof(a19);
{
extern A10 a19;
sizeof(a19);
}
sizeof(a19);
}
extern A10 a19;
A10 *b5;
void
g5 (void)
{
sizeof(*b5);
{
extern IA *b5;
sizeof(*b5);
{
int b5;
{
extern A10 *b5;
sizeof(*b5);
}
}
sizeof(*b5);
}
sizeof(*b5);
}
extern A10 *b5;
A10 *b7;
void
g7 (void)
{
sizeof(*b7);
{
extern A10 *b7;
sizeof(*b7);
{
int b7;
{
extern A10 *b7;
sizeof(*b7);
}
}
sizeof(*b7);
}
sizeof(*b7);
}
extern A10 *b7;
extern A10 *b13;
void
g13 (void)
{
sizeof(*b13);
{
extern IA *b13;
sizeof(*b13);
{
int b13;
{
extern A10 *b13;
sizeof(*b13);
}
}
sizeof(*b13);
}
sizeof(*b13);
}
extern A10 *b13;
extern A10 *b15;
void
g15 (void)
{
sizeof(*b15);
{
extern A10 *b15;
sizeof(*b15);
{
int b15;
{
extern A10 *b15;
sizeof(*b15);
}
}
sizeof(*b15);
}
sizeof(*b15);
}
extern A10 *b15;
static A10 *b18;
void
g18 (void)
{
sizeof(*b18);
{
extern IA *b18;
sizeof(*b18);
}
sizeof(*b18);
}
extern A10 *b18;
static A10 *b19;
void
g19 (void)
{
sizeof(*b19);
{
extern A10 *b19;
sizeof(*b19);
}
sizeof(*b19);
}
extern A10 *b19;
A10 *c5 (void);
void
h5 (void)
{
sizeof(*c5());
{
extern IA *c5 (void);
sizeof(*c5());
{
int c5;
{
extern A10 *c5 (void);
sizeof(*c5());
}
}
sizeof(*c5());
}
sizeof(*c5());
}
A10 *c5 (void) { return 0; }
A10 *c7 (void);
void
h7 (void)
{
sizeof(*c7());
{
extern A10 *c7 (void);
sizeof(*c7());
{
int c7;
{
extern A10 *c7 (void);
sizeof(*c7());
}
}
sizeof(*c7());
}
sizeof(*c7());
}
A10 *c7 (void) { return 0; }
extern A10 *c13 (void);
void
h13 (void)
{
sizeof(*c13());
{
extern IA *c13 (void);
sizeof(*c13());
{
int c13;
{
extern A10 *c13 (void);
sizeof(*c13());
}
}
sizeof(*c13());
}
sizeof(*c13());
}
extern A10 *c13 (void) { return 0; }
extern A10 *c15 (void);
void
h15 (void)
{
sizeof(*c15());
{
extern A10 *c15 (void);
sizeof(*c15());
{
int c15;
{
extern A10 *c15 (void);
sizeof(*c15());
}
}
sizeof(*c15());
}
sizeof(*c15());
}
extern A10 *c15 (void) { return 0; }
static A10 *c18 (void);
void
h18 (void)
{
sizeof(*c18());
{
extern IA *c18 (void);
sizeof(*c18());
}
sizeof(*c18());
}
static A10 *c18 (void) { return 0; }
static A10 *c19 (void);
void
h19 (void)
{
sizeof(*c19());
{
extern A10 *c19 (void);
sizeof(*c19());
}
sizeof(*c19());
}
static A10 *c19 (void) { return 0; }
|