* testsuite/libgomp.fortran/vla7.f90: Add -w to options.
[official-gcc.git] / gcc / testsuite / gcc.dg / Wshadow-1.c
blobc4553a435614bf7a05f488d47db0ed841978f4ca
1 /* Copyright (C) 2001 Free Software Foundation, Inc. */
3 /* { dg-do compile } */
4 /* { dg-options "-Wshadow -pedantic-errors" } */
6 /* Source: Neil Booth, 5 Dec 2001. */
8 int decl1; /* { dg-warning "shadowed declaration" } */
9 void foo (double decl1) /* { dg-warning "shadows a global decl" } */
13 void foo1 (int d) /* { dg-warning "previous definition" } */
15 double d; /* { dg-bogus "warning" "warning in place of error" } */
16 /* { dg-error "redeclared as different" "" { target *-*-* } 15 } */
19 void foo2 (int d) /* { dg-warning "shadowed declaration" } */
22 double d; /* { dg-warning "shadows a parameter" } */
26 void foo3 ()
28 int local; /* { dg-warning "shadowed declaration" } */
30 int local; /* { dg-warning "shadows a previous local" } */