template void foo (int); template class Q { friend void foo (int) { } // { dg-error "15:defining explicit specialization" } };