http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59635

            Bug ID: 59635
           Summary: [c++1y] ICE with auto and ... as lambda parameter
           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 valid code line (compiled with "-std=c++1y") triggers an
ICE on trunk:

===========================================
auto i = [] (auto,...) { return 0; };
===========================================


bug.cc:1:36: internal compiler error: tree check: expected function_decl, have
template_decl in maybe_add_lambda_conv_op, at cp/lambda.c:973
 auto i = [] (auto,...) { return 0; };
                                    ^
0xd8f084 tree_check_failed(tree_node const*, char const*, int, char const*,
...)
        ../../gcc/gcc/tree.c:9192
0x7736de tree_check
        ../../gcc/gcc/tree.h:2707
0x7736de maybe_add_lambda_conv_op(tree_node*)
        ../../gcc/gcc/cp/lambda.c:973
0x67cd8b cp_parser_lambda_expression
        ../../gcc/gcc/cp/parser.c:8763
0x67cd8b 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
0x682ce5 cp_parser_constant_expression
        ../../gcc/gcc/cp/parser.c:8372
0x693fc6 cp_parser_init_declarator
        ../../gcc/gcc/cp/parser.c:16761
0x69562f cp_parser_simple_declaration
        ../../gcc/gcc/cp/parser.c:11200
0x679003 cp_parser_block_declaration
        ../../gcc/gcc/cp/parser.c:11081
0x69fcd3 cp_parser_declaration
        ../../gcc/gcc/cp/parser.c:10978
0x69e9c8 cp_parser_declaration_seq_opt
        ../../gcc/gcc/cp/parser.c:10864
0x6a02ba cp_parser_translation_unit
        ../../gcc/gcc/cp/parser.c:4018
0x6a02ba c_parse_file()
        ../../gcc/gcc/cp/parser.c:31331
0x7c30f3 c_common_parse_file()
        ../../gcc/gcc/c-family/c-opts.c:1060
Please submit a full bug report, [etc.]

Reply via email to