1 // { dg-do compile } 2 3 // Origin: kparz@iastate.edu 4 5 // PR c++/7939: ICE for invalid function parameter after template 6 // substitution. 7 foo(T,U)8template <class T, class U> void foo(T, U) {} 9 template <class T> void foo<T,void>(T, void) {} // { dg-error "40:invalid use of type .void." } 10 // { dg-error "25:non-class, non-variable partial specialization" "" { target c++14 } .-1 } 11 // { dg-error "25:non-type partial specialization" "" { target c++11_down } .-2 } 12