1 /* { dg-do compile } */
2 /* { dg-options "-Wshadow=local" } */
3 
4 int decl1;			/* should not warn */
foo(double decl1)5 void foo (double decl1)		/* should not warn */
6 {
7 }
8 
foo2(int d)9 void foo2 (int d)		/* { dg-message "shadowed declaration" } */
10 {
11   {
12     double d;			/* { dg-warning "shadows a parameter" } */
13   }
14 }
15 
foo3()16 void foo3 ()
17 {
18   int local;			/* { dg-message "shadowed declaration" } */
19   {
20     int local;			/* { dg-warning "shadows a previous local" } */
21   }
22 }
23