1/* PR c++/14622. The invalid explicit instantiation was not reported. */
2/* { dg-do compile } */
3template<class T>
4class A
5{
6  static T a;
7};
8
9template<class T>
10T A<T>::a;
11
12struct B {};
13
14template B A<int>::a; /* { dg-error "does not match declared type" } */
15template float A<float>::a;
16