[Bug c++/56464] Crashes when using implicit this in a lambda capture in member initilizer

mpolacek at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Feb 26 16:26:00 GMT 2013


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

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mpolacek at gcc dot gnu.org

--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> 2013-02-26 16:26:00 UTC ---
With trunk (may be a dup, there are a lot of lambda-related crashes):

lam.C:1:35: internal compiler error: Segmentation fault
 struct bug { bug*a = [&](){return this;}(); };
                                   ^
0xc495e1 crash_signal
    /home/marek/src/gcc/gcc/toplev.c:332
0x54b550 tree_not_check2(tree_node*, char const*, int, char const*, tree_code,
tree_code)
    /home/marek/src/gcc/gcc/tree.h:3706
0x71390e lambda_expr_this_capture(tree_node*)
    /home/marek/src/gcc/gcc/cp/semantics.c:9450
0x6f5c8b finish_this_expr()
    /home/marek/src/gcc/gcc/cp/semantics.c:2295
0x663afe cp_parser_primary_expression
    /home/marek/src/gcc/gcc/cp/parser.c:4133
0x666731 cp_parser_postfix_expression
    /home/marek/src/gcc/gcc/cp/parser.c:5629
0x6687d6 cp_parser_unary_expression
    /home/marek/src/gcc/gcc/cp/parser.c:6685
0x669337 cp_parser_cast_expression
    /home/marek/src/gcc/gcc/cp/parser.c:7266
0x669394 cp_parser_binary_expression
    /home/marek/src/gcc/gcc/cp/parser.c:7365
0x669a0a cp_parser_assignment_expression
    /home/marek/src/gcc/gcc/cp/parser.c:7590
0x669c34 cp_parser_expression
    /home/marek/src/gcc/gcc/cp/parser.c:7741
0x66b7a3 cp_parser_lambda_body
    /home/marek/src/gcc/gcc/cp/parser.c:8632
0x66a62a cp_parser_lambda_expression
    /home/marek/src/gcc/gcc/cp/parser.c:8194
0x66397e cp_parser_primary_expression
    /home/marek/src/gcc/gcc/cp/parser.c:4085
0x666731 cp_parser_postfix_expression
    /home/marek/src/gcc/gcc/cp/parser.c:5629
0x6687d6 cp_parser_unary_expression
    /home/marek/src/gcc/gcc/cp/parser.c:6685
0x669337 cp_parser_cast_expression
    /home/marek/src/gcc/gcc/cp/parser.c:7266
0x669394 cp_parser_binary_expression
    /home/marek/src/gcc/gcc/cp/parser.c:7365
0x669a0a cp_parser_assignment_expression
    /home/marek/src/gcc/gcc/cp/parser.c:7590
0x669d4f cp_parser_constant_expression
    /home/marek/src/gcc/gcc/cp/parser.c:7821
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.



More information about the Gcc-bugs mailing list