gcc/testsuite/gcc.dg/debug/redecl-5.c
raw| 1 | /* Test for multiple declarations and composite types, as in bug |
| 2 | 13801. Test types saved from outer scopes are up to date. Debug |
| 3 | test. */ |
| 4 | /* Origin: Joseph Myers <[email protected]> */ |
| 5 | /* { dg-do compile } */ |
| 6 | /* { dg-options "" } */ |
| 7 | |
| 8 | int x[]; |
| 9 | |
| 10 | void |
| 11 | f (void) |
| 12 | { |
| 13 | extern int x[]; |
| 14 | } |
| 15 | |
| 16 | int x[10]; |
| 17 | |
| 18 | void |
| 19 | g (void) |
| 20 | { |
| 21 | int x; |
| 22 | { |
| 23 | extern int x[10]; |
| 24 | } |
| 25 | } |
| 26 | |
| 27 | void |
| 28 | h (void) |
| 29 | { |
| 30 | sizeof (x); |
| 31 | } |