The following invalid code snippet triggers an ICE on mainline: ================================================================ template<typename int M, int N, int (*... p)[N]> struct A {};
A<0> a; ================================================================ bug.cc:1: error: expected nested-name-specifier before 'int' bug.cc:1: error: two or more data types in declaration of 'M' bug.cc:1: error: no default argument for 'N' bug.cc:1: error: no default argument for 'p' bug.cc:3: error: '<type error>' is not a valid type for a template constant parameter bug.cc:3: error: template argument 2 is invalid bug.cc:3: internal compiler error: tree check: accessed elt 2 of tree_vec with 1 elts in tsubst, at cp/pt.c:8934 Please submit a full bug report, [etc.] The ICE appeared between 2007-10-13 and 2007-11-13. Maybe related to PR34751. -- Summary: [4.3 regression] ICE with invalid parameters in variadic template Product: gcc Version: 4.3.0 Status: UNCONFIRMED Keywords: ice-on-invalid-code, error-recovery, monitored Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: reichelt at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34757