https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71548
Martin Sebor <msebor at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |ice-on-invalid-code Status|UNCONFIRMED |NEW Last reconfirmed| |2016-06-17 CC| |msebor at gcc dot gnu.org Ever confirmed|0 |1 Known to fail| |4.7.0, 5.3.0, 6.1.0, 7.0 --- Comment #1 from Martin Sebor <msebor at gcc dot gnu.org> --- Confirmed as ice-on-invalid-code. My bisection points to r179441 as the first commit that triggered an ICE but since the commit isn't relevant to the C++ front end it must have been one before it and after r179435 which fails with: sorry, unimplemented: cannot expand ‘T ...’ into a fixed-length argument list Looking at the commits in between r179436 is the only possible root cause. Recent trunk fails with the following output: $ cat t.C && gcc -Wall t.C template<typename> class fl {}; template<typename = void, template<class...> class = fl> struct S {}; template<typename... T> void f(S<T...> ) {} void lol() { S<> s; f(s); } t.C: In substitution of ‘template<class ... T> void f(S<T ...>) [with T = <missing>]’: t.C:8:8: required from here t.C:8:8: internal compiler error: tree check: expected class ‘type’, have ‘declaration’ (template_decl) in cp_type_quals, at cp/typeck.c:9154 f(s); ^ 0x13ad713 tree_class_check_failed(tree_node const*, tree_code_class, char const*, int, char const*) ../../gcc/tree.c:9803 0x72a08d tree_class_check(tree_node const*, tree_code_class, char const*, int, char const*) ../../gcc/tree.h:3409 0x911f1e cp_type_quals(tree_node const*) ../../gcc/cp/typeck.c:9154 0x803b7c check_cv_quals_for_unify ../../gcc/cp/pt.c:19053 0x807fab unify ../../gcc/cp/pt.c:19707 0x8010f4 unify_one_argument ../../gcc/cp/pt.c:18292 0x8045b2 unify_pack_expansion ../../gcc/cp/pt.c:19203 0x808fac unify ../../gcc/cp/pt.c:19969 0x80382f try_class_unification ../../gcc/cp/pt.c:18965 0x8093af unify ../../gcc/cp/pt.c:19999 0x8010f4 unify_one_argument ../../gcc/cp/pt.c:18292 0x80139d type_unification_real ../../gcc/cp/pt.c:18366 0x7ff912 fn_type_unification(tree_node*, tree_node*, tree_node*, tree_node* const*, unsigned int, tree_node*, unification_kind_t, int, bool, bool) ../../gcc/cp/pt.c:17811 0x73495c add_template_candidate_real ../../gcc/cp/call.c:3110 0x734db1 add_template_candidate ../../gcc/cp/call.c:3188 0x73c9ed add_candidates ../../gcc/cp/call.c:5361 0x737b34 perform_overload_resolution ../../gcc/cp/call.c:4045 0x737d9b build_new_function_call(tree_node*, vec<tree_node*, va_gc, vl_embed>**, bool, int) ../../gcc/cp/call.c:4122 0x954894 finish_call_expr(tree_node*, vec<tree_node*, va_gc, vl_embed>**, bool, bool, int) ../../gcc/cp/semantics.c:2433 0x898a02 cp_parser_postfix_expression ../../gcc/cp/parser.c:6904 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <http://gcc.gnu.org/bugs.html> for instructions.