// PR c++/27496 // { dg-do compile } template struct A { template friend class X; // { dg-error "void|valid type" } }; A<0> a;