// { dg-do compile } template void foo (int); template class Q { friend void foo (int = 3); // { dg-error "27:default arguments are not allowed in declaration of friend" } };