https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79790
Martin Sebor <msebor at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2017-03-16 CC| |msebor at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #4 from Martin Sebor <msebor at gcc dot gnu.org> --- Oddly, I'm not able to reproduce the ICE with the test case with today's top of trunk or any recent revisions (February through March 2017). They all issue the error below and exit: t.C:4:29: error: cannot deduce template arguments for ‘std::array<_Tp, _Nm>’, as it has no deduction guides or user-declared constructors constexpr const int& operator[](int i) const { return a[i]; } ^ But the following test case does reproduce it: $ cat t.C && gcc -Wall -Wextra -Wpedantic -std=c++1z t.C template <int N> struct array { int a [N]; }; array a = { 1, 2, 3 }; t.C:7:21: error: class template argument deduction failed: array a = { 1, 2, 3 }; ^ t.C:7:21: internal compiler error: Segmentation fault 0x1174c74 crash_signal /src/gcc/svn/gcc/toplev.c:337 0x7b8893 print_error_for_call_failure /src/gcc/svn/gcc/cp/call.c:4170 0x7b8ab9 build_new_function_call(tree_node*, vec<tree_node*, va_gc, vl_embed>**, bool, int) /src/gcc/svn/gcc/cp/call.c:4224 0x8a5474 do_class_deduction /src/gcc/svn/gcc/cp/pt.c:25270 0x8a562b do_auto_deduction(tree_node*, tree_node*, tree_node*, int, auto_deduction_context, tree_node*, int) /src/gcc/svn/gcc/cp/pt.c:25322 0x7f5d61 cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int) /src/gcc/svn/gcc/cp/decl.c:6835 0x9419c3 cp_parser_init_declarator /src/gcc/svn/gcc/cp/parser.c:19384 0x935b04 cp_parser_simple_declaration /src/gcc/svn/gcc/cp/parser.c:12781 0x93567c cp_parser_block_declaration /src/gcc/svn/gcc/cp/parser.c:12599 0x9353fe cp_parser_declaration /src/gcc/svn/gcc/cp/parser.c:12496 0x934f5d cp_parser_declaration_seq_opt /src/gcc/svn/gcc/cp/parser.c:12372 0x923dc1 cp_parser_translation_unit /src/gcc/svn/gcc/cp/parser.c:4366 0x9742a4 c_parse_file() /src/gcc/svn/gcc/cp/parser.c:38423 0xb27abd c_common_parse_file() /src/gcc/svn/gcc/c-family/c-opts.c:1107 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions.