re PR c++/71465 (ICE on invalid C++ code (with duplicate base) on x86_64-linux-gnu...
[platform/upstream/gcc.git] / gcc / testsuite / g++.dg / warn / Wshadow-9.C
1 // PR c++/56100
2 // { dg-options "-Wshadow" }
3
4 int foo;  // { dg-message "shadowed declaration" }
5
6 template <typename T>
7 struct bar
8 {
9   void baz () { int foo; }  // { dg-warning "shadows a global" }
10 };
11
12 int main ()
13 {
14   bar <int> ().baz ();
15 }