view gcc/testsuite/g++.dg/template/crash11.C @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 04ced10e8804
children
line wrap: on
line source

// { dg-do compile }

// Origin: kparz@iastate.edu

// PR c++/7939: ICE for invalid function parameter after template
// substitution.

template <class T, class U> void foo(T, U) {}
template <class T> void foo<T,void>(T, void) {} // { dg-error "40:invalid use of type .void." }
// { dg-error "25:non-class, non-variable partial specialization" "" { target c++14 } .-1 }
// { dg-error "25:non-type partial specialization" "" { target c++11_down } .-2 }