1 /* Test for multiple declarations and composite types. As in bug
2 13801. Test no problems in debug information generation. */
3 /* Origin: Joseph Myers <jsm@polyomino.org.uk> */
4 /* { dg-do compile } */
5 /* { dg-options "" } */
10 /* Test all combinations of: a variable declared at file scope (no
11 type specifiers, or extern, or static), or just inside a function
12 (with extern), redeclared in an inner scope (with extern), and
13 redeclared in an inner scope when the previous declaration is
14 hidden (with extern, and not if the original declaration was
15 static). Test three times: incomplete variable types; pointers to
16 incomplete types; functions returning such pointers.
18 This test only includes the valid code cases, to test debug info
19 generation. (Incomplete static at file scope is not permitted by
20 ISO C, but is accepted by GCC as an extension without
250 extern IA
*c5 (void);
255 extern A10
*c5 (void);
263 A10
*c5 (void) { return 0; }
271 extern A10
*c7 (void);
276 extern A10
*c7 (void);
284 A10
*c7 (void) { return 0; }
286 extern A10
*c13 (void);
292 extern IA
*c13 (void);
297 extern A10
*c13 (void);
305 extern A10
*c13 (void) { return 0; }
307 extern A10
*c15 (void);
313 extern A10
*c15 (void);
318 extern A10
*c15 (void);
326 extern A10
*c15 (void) { return 0; }
328 static A10
*c18 (void);
334 extern IA
*c18 (void);
339 static A10
*c18 (void) { return 0; }
341 static A10
*c19 (void);
347 extern A10
*c19 (void);
352 static A10
*c19 (void) { return 0; }