public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/60251] New: [4.9 Regression] [c++11] ICE capturing variable-length array
@ 2014-02-17 21:34 reichelt at gcc dot gnu.org
  2014-02-17 21:35 ` [Bug c++/60251] " reichelt at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: reichelt at gcc dot gnu.org @ 2014-02-17 21:34 UTC (permalink / raw)
  To: gcc-bugs

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]'.


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

end of thread, other threads:[~2014-02-21 14:31 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-17 21:34 [Bug c++/60251] New: [4.9 Regression] [c++11] ICE capturing variable-length array reichelt at gcc dot gnu.org
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

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).