template struct Foo {}; template void Foo::NON_EXISTENT(int* val = new int()) {} // { dg-error "" }