gcc/testsuite/gcc.dg/decl-5.c
raw| 1 | /* PR c/14114 */ |
| 2 | /* Origin: <[email protected]> */ |
| 3 | /* { dg-do compile } */ |
| 4 | /* { dg-options "-O2 -g" } */ |
| 5 | |
| 6 | /* This used to fail because the compiler thought that the |
| 7 | declaration of 'c' from 'b' was shadowing that from 'a'. */ |
| 8 | |
| 9 | void a() |
| 10 | { |
| 11 | void c(); |
| 12 | c(); |
| 13 | } |
| 14 | |
| 15 | void b() |
| 16 | { |
| 17 | void c(); |
| 18 | } |
| 19 | |
| 20 | void c() {} |