1// PR c++/23293
2
3template < typename > struct P;
4struct S;
5
6void *unrelated_function()
7{
8  typedef S K;
9  P < K > * p;
10  return p;
11}
12
13template < typename U >
14void generate_warning()
15{
16  U::x(); // { dg-error "P<S>" }
17}
18
19int main()
20{
21  generate_warning< P < S > >();
22}
23