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 / Wunused-var-23.C
1 // PR c++/64383
2 // { dg-options "-Wunused-variable" }
3
4 struct Y
5 {
6     ~Y();
7 };
8
9 struct X
10 {
11     static Y& get();
12 };
13
14 int main()
15 {
16     Y& y = X::get();  // { dg-warning "unused" }
17 }