public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "reichelt at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/60251] New: [4.9 Regression] [c++11] ICE capturing variable-length array Date: Mon, 17 Feb 2014 21:34:00 -0000 [thread overview] Message-ID: <bug-60251-4@http.gcc.gnu.org/bugzilla/> (raw) http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60251 Bug ID: 60251 Summary: [4.9 Regression] [c++11] ICE capturing variable-length array Product: gcc Version: 4.9.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following valid code snippet (compiled with "-std=c++11") triggers an ICE on trunk: ==================================== void foo(int n) { int x[n]; [&x]() { decltype(x) y; }; } ==================================== bug.cc: In lambda function: bug.cc:4:21: internal compiler error: in is_normal_capture_proxy, at cp/lambda.c:258 [&x]() { decltype(x) y; }; ^ 0x7a28d0 is_normal_capture_proxy(tree_node*) ../../gcc/gcc/cp/lambda.c:258 0x7a69bc is_lambda_ignored_entity(tree_node*) ../../gcc/gcc/cp/lambda.c:1076 0x77b6ef qualify_lookup ../../gcc/gcc/cp/name-lookup.c:4270 0x7805fc lookup_name_real_1 ../../gcc/gcc/cp/name-lookup.c:4798 0x7805fc lookup_name_real(tree_node*, int, int, bool, int, int) ../../gcc/gcc/cp/name-lookup.c:4883 0x6a1276 cp_parser_lookup_name ../../gcc/gcc/cp/parser.c:22231 0x6b37b2 cp_parser_lookup_name_simple ../../gcc/gcc/cp/parser.c:22294 0x6b37b2 cp_parser_decltype_expr ../../gcc/gcc/cp/parser.c:11854 0x6b37b2 cp_parser_decltype ../../gcc/gcc/cp/parser.c:12003 0x6cb40f cp_parser_simple_type_specifier ../../gcc/gcc/cp/parser.c:14533 0x6a942d cp_parser_type_specifier ../../gcc/gcc/cp/parser.c:14380 0x6c2b40 cp_parser_decl_specifier_seq ../../gcc/gcc/cp/parser.c:11547 0x6c9739 cp_parser_simple_declaration ../../gcc/gcc/cp/parser.c:11137 0x6acc03 cp_parser_block_declaration ../../gcc/gcc/cp/parser.c:11086 0x6add21 cp_parser_declaration_statement ../../gcc/gcc/cp/parser.c:10733 0x6ae36b cp_parser_statement ../../gcc/gcc/cp/parser.c:9467 0x6af159 cp_parser_statement_seq_opt ../../gcc/gcc/cp/parser.c:9745 0x6b07ce cp_parser_lambda_body ../../gcc/gcc/cp/parser.c:9249 0x6b07ce cp_parser_lambda_expression ../../gcc/gcc/cp/parser.c:8757 0x6b07ce cp_parser_primary_expression ../../gcc/gcc/cp/parser.c:4305 Please submit a full bug report, [etc.] The code compiles fine, if I capture '[&]' instead of '[&x]'.
next reply other threads:[~2014-02-17 21:34 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-02-17 21:34 reichelt at gcc dot gnu.org [this message] 2014-02-17 21:35 ` [Bug c++/60251] " reichelt at gcc dot gnu.org 2014-02-18 6:41 ` jakub at gcc dot gnu.org 2014-02-18 9:25 ` rguenth at gcc dot gnu.org 2014-02-19 15:59 ` paolo.carlini at oracle dot com 2014-02-21 4:36 ` jason at gcc dot gnu.org 2014-02-21 4:37 ` jason at gcc dot gnu.org 2014-02-21 14:01 ` jason at gcc dot gnu.org 2014-02-21 14:31 ` jakub at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-60251-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).