// PR c++/38647 // { dg-do compile } // { dg-prune-output "note" } template struct A {}; const char func[] = "abc"; template struct A {}; // { dg-error "cannot appear|is invalid|not a valid|constant expression" } char a1[1]; A a; template struct B {}; template struct B<__FUNCTION__, N> {}; // { dg-error "cannot appear|is invalid|is not a valid|constant expression" } char b1[1]; B b; template struct C {}; template struct C<__PRETTY_FUNCTION__, N> {}; // { dg-error "cannot appear|is invalid|is not a valid|constant expression" } char c1[1]; C c; template struct D {}; template struct D<__func__, N> {}; // { dg-error "cannot appear|is invalid|is not a valid|function scope|constant expression" } char d1[1]; D d;