https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81060
Bug ID: 81060 Summary: [8 Regression] ICE with un-expanded parameter pack Product: gcc Version: 8.0 Status: UNCONFIRMED Keywords: error-recovery, ice-on-invalid-code Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org Target Milestone: --- The following invalid testcase triggers an ICE on trunk: ================================================================ template<typename... T> struct A { static const int i; }; template<typename... T> const int A<T>::i = []{ return 0; }(); ================================================================ bug.cc:6:41: error: template definition of non-template 'const int A<T>::i' template<typename... T> const int A<T>::i = []{ return 0; }(); ^ bug.cc:6:46: error: parameter packs not expanded with '...': template<typename... T> const int A<T>::i = []{ return 0; }(); ^ bug.cc:6:46: note: 'T' bug.cc:6:46: error: parameter packs not expanded with '...': bug.cc:6:46: note: 'T' Internal compiler error: Error reporting routines re-entered. 0x767408 tree_class_check_failed(tree_node const*, tree_code_class, char const*, int, char const*) ../../gcc/gcc/tree.c:9909 0x5f69d1 tree_class_check(tree_node*, tree_code_class, char const*, int, char const*) ../../gcc/gcc/tree.h:3206 0x5f69d1 dump_lambda_function ../../gcc/gcc/cp/error.c:1551 0x5f69d1 dump_function_decl ../../gcc/gcc/cp/error.c:1605 0x8aab6c decl_as_string_translate(tree_node*, int) ../../gcc/gcc/cp/error.c:2983 0x9a8b80 cxx_printable_name_internal ../../gcc/gcc/cp/tree.c:2546 0x8a8a62 cp_print_error_function ../../gcc/gcc/cp/error.c:3317 0x8a8a62 cp_diagnostic_starter ../../gcc/gcc/cp/error.c:3271 0x165f93b diagnostic_report_diagnostic(diagnostic_context*, diagnostic_info*) ../../gcc/gcc/diagnostic.c:975 0x165fc7e diagnostic_impl ../../gcc/gcc/diagnostic.c:1099 0x16608a4 internal_error(char const*, ...) ../../gcc/gcc/diagnostic.c:1410 0x767408 tree_class_check_failed(tree_node const*, tree_code_class, char const*, int, char const*) ../../gcc/gcc/tree.c:9909 0x5f69d1 tree_class_check(tree_node*, tree_code_class, char const*, int, char const*) ../../gcc/gcc/tree.h:3206 0x5f69d1 dump_lambda_function ../../gcc/gcc/cp/error.c:1551 0x5f69d1 dump_function_decl ../../gcc/gcc/cp/error.c:1605 0x8aab6c decl_as_string_translate(tree_node*, int) ../../gcc/gcc/cp/error.c:2983 0x9a8b80 cxx_printable_name_internal ../../gcc/gcc/cp/tree.c:2546 0x8a8a62 cp_print_error_function ../../gcc/gcc/cp/error.c:3317 0x8a8a62 cp_diagnostic_starter ../../gcc/gcc/cp/error.c:3271 0x165f93b diagnostic_report_diagnostic(diagnostic_context*, diagnostic_info*) ../../gcc/gcc/diagnostic.c:975 Please submit a full bug report, [etc.] The regression appeared between 2017-05-09 and 2017-05-12.