From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31053 invoked by alias); 23 Mar 2014 20:21:01 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 31041 invoked by uid 48); 23 Mar 2014 20:20:57 -0000 From: "reichelt at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/60628] New: [4.7/4.8/4.9 Regression] [c++11] ICE initializing array of auto Date: Sun, 23 Mar 2014 20:21:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: ice-on-invalid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: reichelt at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status keywords bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-03/txt/msg02108.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60628 Bug ID: 60628 Summary: [4.7/4.8/4.9 Regression] [c++11] ICE initializing array of auto Product: gcc Version: 4.9.0 Status: UNCONFIRMED Keywords: ice-on-invalid-code Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following (invalid?) code snippet (compiled with "-std=c++11" or "-std=c++0x" for older compilers) triggers an ICE since GCC 4.6.0: ================================= #include void foo(int i) { auto x[i] = { 0 }; } ================================= bug.cc: In function 'void foo(int)': bug.cc:5:19: internal compiler error: in tsubst_copy, at cp/pt.c:13032 auto x[i] = { 0 }; ^ 0x62bba3 tsubst_copy ../../gcc/gcc/cp/pt.c:13032 0x60a6a6 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool, bool) ../../gcc/gcc/cp/pt.c:15287 0x614496 tsubst_expr ../../gcc/gcc/cp/pt.c:13980 0x61dc56 tsubst(tree_node*, tree_node*, int, tree_node*) ../../gcc/gcc/cp/pt.c:11597 0x61cf47 tsubst(tree_node*, tree_node*, int, tree_node*) ../../gcc/gcc/cp/pt.c:12046 0x648e17 listify_autos ../../gcc/gcc/cp/pt.c:21612 0x648e17 do_auto_deduction(tree_node*, tree_node*, tree_node*) ../../gcc/gcc/cp/pt.c:21636 0x5db251 cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int) ../../gcc/gcc/cp/decl.c:6198 0x6cd22d cp_parser_init_declarator ../../gcc/gcc/cp/parser.c:16858 0x6ce9e9 cp_parser_simple_declaration ../../gcc/gcc/cp/parser.c:11225 0x6b2983 cp_parser_block_declaration ../../gcc/gcc/cp/parser.c:11106 0x6b3aa1 cp_parser_declaration_statement ../../gcc/gcc/cp/parser.c:10753 0x6b40eb cp_parser_statement ../../gcc/gcc/cp/parser.c:9486 0x6b4f39 cp_parser_statement_seq_opt ../../gcc/gcc/cp/parser.c:9764 0x6b50a6 cp_parser_compound_statement ../../gcc/gcc/cp/parser.c:9718 0x6c62db cp_parser_function_body ../../gcc/gcc/cp/parser.c:18736 0x6c62db cp_parser_ctor_initializer_opt_and_function_body ../../gcc/gcc/cp/parser.c:18772 0x6cc8b2 cp_parser_function_definition_after_declarator ../../gcc/gcc/cp/parser.c:22897 0x6cd75f cp_parser_function_definition_from_specifiers_and_declarator ../../gcc/gcc/cp/parser.c:22809 0x6cd75f cp_parser_init_declarator ../../gcc/gcc/cp/parser.c:16628 Please submit a full bug report, [etc.]