public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/63385] New: internal compiler error: in pop_binding, at cp/name-lookup.c for implicitly captured variable called closure
@ 2014-09-26 18:45 kretz at kde dot org
  2014-09-26 18:47 ` [Bug c++/63385] " kretz at kde dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: kretz at kde dot org @ 2014-09-26 18:45 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63385

            Bug ID: 63385
           Summary: internal compiler error: in pop_binding, at
                    cp/name-lookup.c for implicitly captured variable
                    called closure
           Product: gcc
           Version: 4.8.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: kretz at kde dot org

Testcase:

template <typename F> void f(F closure) { auto g = [&]() { return closure; }; }

Compile with 'g++ -std=c++11'. Output with gcc 4.8.3:
internal compiler error: in pop_binding, at cp/name-lookup.c:382
 template <typename F> void f(F closure) { auto g = [=]() { return closure; };
}
                                                                            ^
0x5fadd9 pop_binding(tree_node*, tree_node*)
        ../.././gcc/cp/name-lookup.c:382
0x52e92b poplevel(int, int, int)
        ../.././gcc/cp/decl.c:731
0x538cf8 finish_function(int)
        ../.././gcc/cp/decl.c:13845
0x58b167 cp_parser_lambda_body
        ../.././gcc/cp/parser.c:8766
0x58b167 cp_parser_lambda_expression
        ../.././gcc/cp/parser.c:8295
0x58b167 cp_parser_primary_expression
        ../.././gcc/cp/parser.c:4104
0x592e10 cp_parser_postfix_expression
        ../.././gcc/cp/parser.c:5667
0x5916fd cp_parser_unary_expression
        ../.././gcc/cp/parser.c:6732
0x59684f cp_parser_binary_expression
        ../.././gcc/cp/parser.c:7424
0x596cff cp_parser_assignment_expression
        ../.././gcc/cp/parser.c:7660
0x597134 cp_parser_assignment_expression
        ../.././gcc/cp/parser.c:7710
0x597134 cp_parser_constant_expression
        ../.././gcc/cp/parser.c:7920
0x5a5afc cp_parser_init_declarator
        ../.././gcc/cp/parser.c:16079
0x5a601e cp_parser_simple_declaration
        ../.././gcc/cp/parser.c:10670
0x5a1920 cp_parser_block_declaration
        ../.././gcc/cp/parser.c:10551
0x5a2940 cp_parser_declaration_statement
        ../.././gcc/cp/parser.c:10195
0x5a2fe7 cp_parser_statement
        ../.././gcc/cp/parser.c:8969
0x5a41de cp_parser_statement_seq_opt
        ../.././gcc/cp/parser.c:9241
0x5a42fe cp_parser_compound_statement
        ../.././gcc/cp/parser.c:9195
0x5a4448 cp_parser_function_body
        ../.././gcc/cp/parser.c:17816

4.9.x compiles the code fine.


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-03-25 15:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-26 18:45 [Bug c++/63385] New: internal compiler error: in pop_binding, at cp/name-lookup.c for implicitly captured variable called closure kretz at kde dot org
2014-09-26 18:47 ` [Bug c++/63385] " kretz at kde dot org
2014-09-26 19:43 ` jakub at gcc dot gnu.org
2014-09-26 19:58 ` jason at gcc dot gnu.org
2014-11-23 14:34 ` paolo.carlini at oracle dot com
2015-03-25 15:45 ` mpolacek at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).