http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59636
Bug ID: 59636 Summary: [c++1y] ICE with missing template parameter in lambda Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following invalid code line (compiled with "-std=c++1y") triggers an ICE on trunk: =========================================== auto i = []() { return []<>() {}; }; =========================================== bug.cc: In lambda function: bug.cc:1:26: internal compiler error: Segmentation fault auto i = []() { return []<>() {}; }; ^ 0xb75baf crash_signal ../../gcc/gcc/toplev.c:336 0x6916ef cp_parser_template_parameter ../../gcc/gcc/cp/parser.c:13055 0x6916ef cp_parser_template_parameter_list ../../gcc/gcc/cp/parser.c:12882 0x67d322 cp_parser_lambda_declarator_opt ../../gcc/gcc/cp/parser.c:9027 0x67d322 cp_parser_lambda_expression ../../gcc/gcc/cp/parser.c:8751 0x67d322 cp_parser_primary_expression ../../gcc/gcc/cp/parser.c:4309 0x67e5da cp_parser_postfix_expression ../../gcc/gcc/cp/parser.c:5969 0x681698 cp_parser_unary_expression ../../gcc/gcc/cp/parser.c:7170 0x68232f cp_parser_binary_expression ../../gcc/gcc/cp/parser.c:7874 0x682821 cp_parser_assignment_expression ../../gcc/gcc/cp/parser.c:8112 0x6847b4 cp_parser_expression ../../gcc/gcc/cp/parser.c:8274 0x67dce1 cp_parser_expression ../../gcc/gcc/cp/parser.c:8313 0x67dce1 cp_parser_lambda_body ../../gcc/gcc/cp/parser.c:9223 0x67dce1 cp_parser_lambda_expression ../../gcc/gcc/cp/parser.c:8754 0x67dce1 cp_parser_primary_expression ../../gcc/gcc/cp/parser.c:4309 0x67e5da cp_parser_postfix_expression ../../gcc/gcc/cp/parser.c:5969 0x681698 cp_parser_unary_expression ../../gcc/gcc/cp/parser.c:7170 0x68232f cp_parser_binary_expression ../../gcc/gcc/cp/parser.c:7874 0x682821 cp_parser_assignment_expression ../../gcc/gcc/cp/parser.c:8112 0x682ce5 cp_parser_assignment_expression ../../gcc/gcc/cp/parser.c:8162 Please submit a full bug report, [etc.] Maybe the compiler chokes on the fact that there are more braces, brackets and parentheses than letters in the code ;-)