summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/decl-5.c
blob: d7c36a4a1bc33ce507baa09ac9bf88f8e218ba31 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* PR c/14114 */
/* Origin: <snyder@fnal.gov> */
/* { dg-do compile } */
/* { dg-options "-O2 -g" } */

/* This used to fail because the compiler thought that the
   declaration of 'c' from 'b' was shadowing that from 'a'.  */

void a()
{
  void c();
  c();
} /* { dg-bogus "error" "PR c/14114" { xfail *-*-* } } */

void b()
{
  void c();
}

void c() {}