https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88857
Bug ID: 88857 Summary: ICE in build_value_init Product: gcc Version: 7.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: will at benfold dot com Target Milestone: --- ICE on invalid code (g calls f with the wrong number of args). ---- class Foo { int a; }; void f (const Foo &, int); void g (auto) { f({}); } ---- $ g++ test.cpp -o test.o test.cpp: In function ‘void g(auto:1)’: test.cpp:10:7: internal compiler error: in build_value_init, at cp/init.c:338 f({}); ^ 0x6ac21f build_value_init(tree_node*, int) ../../gcc/cp/init.c:337 0x5d8379 convert_like_real ../../gcc/cp/call.c:6702 0x5d80a6 convert_like_real ../../gcc/cp/call.c:6844 0x5e0363 initialize_reference(tree_node*, tree_node*, int, int) ../../gcc/cp/call.c:10437 0x6a055d convert_for_initialization(tree_node*, tree_node*, tree_node*, int, impl_conv_rhs, tree_node*, int, int) ../../gcc/cp/typeck.c:8679 0x6a178c convert_arguments ../../gcc/cp/typeck.c:3818 0x6a178c cp_build_function_call_vec(tree_node*, vec<tree_node*, va_gc, vl_embed>**, int) ../../gcc/cp/typeck.c:3660 0x5e07e3 build_new_function_call(tree_node*, vec<tree_node*, va_gc, vl_embed>**, bool, int) ../../gcc/cp/call.c:4243 0x6c03a1 finish_call_expr(tree_node*, vec<tree_node*, va_gc, vl_embed>**, bool, bool, int) ../../gcc/cp/semantics.c:2454 0x67393c cp_parser_postfix_expression ../../gcc/cp/parser.c:6997 0x67426d cp_parser_unary_expression ../../gcc/cp/parser.c:8108 0x675013 cp_parser_cast_expression ../../gcc/cp/parser.c:8786 0x675787 cp_parser_binary_expression ../../gcc/cp/parser.c:8887 0x675e54 cp_parser_assignment_expression ../../gcc/cp/parser.c:9174 0x67904a cp_parser_expression ../../gcc/cp/parser.c:9343 0x67da78 cp_parser_expression_statement ../../gcc/cp/parser.c:10898 0x66a8b9 cp_parser_statement ../../gcc/cp/parser.c:10714 0x66b71d cp_parser_statement_seq_opt ../../gcc/cp/parser.c:11040 0x66b7c7 cp_parser_compound_statement ../../gcc/cp/parser.c:10994 0x67c550 cp_parser_function_body ../../gcc/cp/parser.c:21455 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.